Page 1 of 1

Check whether a conversation is waiting for a response?

Posted: Wed Jun 08, 2022 12:29 pm
by LostTrainDude
[Unity 2019.4.39f1 - AdventureCreator v1.75.3 - DS v2.2.27]

Hi Tony!

Is there a "native" way to check whether responses are currently visible on screen? I'm trying to tie that into a state machine that I'm using for a UI manager. Currently I'm using the DialogueSystem Events to send the game into a DIALOGUE_OPTIONS state.

I basically want to hide the response menu and disable all of its inputs while pausing and switching between the different menus (each of them has a different state), but also be able to resume it once I turn them off, sending the game back to its former "DIALOGUE_OPTIONS" state.

Thanks a lot in advance!

Re: Check whether a conversation is waiting for a response?

Posted: Wed Jun 08, 2022 1:20 pm
by Tony Li
Hi,

You could check if the response menu panel is open. Example:

Code: Select all

bool isWaitingForResponse = DialogueManager.standardDialogueUI.conversationUIElements.defaultMenuPanel.isOpen;
If you want callbacks, you can hook into the menu panel's OnOpen() and OnClosed() UnityEvents. (The OnClose() event runs as soon as the menu panel starts to disappear. OnClosed() runs when the panel is fully hidden, in case your panel uses a hide animation.)