Disable continue button while Adventure Creator is paused

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
gblekkenhorst
Posts: 81
Joined: Wed Jun 24, 2020 5:06 pm

Disable continue button while Adventure Creator is paused

Post by gblekkenhorst »

I'm using a combo of Dialogue System and Adventure Creator. When Adventure Creator is paused, it's still possible to click the continue button, which cancels the conversation and because of the way our game is set up, you can never revisit the cut scene. I thought the easiest way to disable everything would be to just add a raycast target panel behind ACs pause menu, but it looks like it's building the pause menu in a way I don't understand.

Is there something I can do to the continue button (or all of dialogue creator) to make it unresponsive when AC is paused?
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable continue button while Adventure Creator is paused

Post by Tony Li »

Hi,

Try disabling the Dialogue Manager Canvas's Graphic Raycaster when AC is paused.
gblekkenhorst
Posts: 81
Joined: Wed Jun 24, 2020 5:06 pm

Re: Disable continue button while Adventure Creator is paused

Post by gblekkenhorst »

This worked great! However we also have space and enter trigger dialogue progression, so we need to disable that as well. Is there a function in dialogue system we can call to disable listening for input or something similar that we can activate and deactivate from AC's pause events?
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable continue button while Adventure Creator is paused

Post by Tony Li »

Hi,

It depends on what causes Space and Enter to trigger dialogue progression.

If your continue button has a UI Button Key Trigger component, set the static property UIButtonKeyTrigger.monitorInput to false. When the pause menu closes set it back to true.

If the continue button is the EventSystem's current selection and the "Submit" input (mapped by default to Space and Enter) is triggering it, set the static property UIPanel.monitorSelection to false, and deselect the current selection using UnityEngine.EventSystem.EventSystem.current.SetSelectedGameObject(null).
gblekkenhorst
Posts: 81
Joined: Wed Jun 24, 2020 5:06 pm

Re: Disable continue button while Adventure Creator is paused

Post by gblekkenhorst »

This fixed everything up, thanks!
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable continue button while Adventure Creator is paused

Post by Tony Li »

Glad to help! :-)
Post Reply