Page 1 of 1
IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 3:11 pm
by Vomdrache
Hey there, after updating to version 2.2.21 I've encountered a few issues I've been able to handle, however, I'm a bit lost on this one.
Previously on the version I was using, when a conversation ended there was no "fade out" for the canvas. Now a fade out is implemented which looks nice but I have a lot of features around "IsConversationActive" which is returning false as soon as the conversation is over, even while the dialogue UI is still visible.
The desired effect is to not let certain things occur (like the player menu opening) while the dialogue UI is at all visible. Is there another boolean I should be checking for?
Re: IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 3:23 pm
by Tony Li
Hi,
Check the dialogue UI's isOpen property: DialogueManager.standardDialogueUI.isOpen.
Depending on how you look at it, technically the conversation (as in the underlying data engine and logic) is no longer active; the dialogue UI is just playing its hide animation. But I totally see your point. The isOpen property should do the trick.
Re: IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 3:35 pm
by Vomdrache
Yeah I figured it only worked before the fade out because the UI disappeared at the same time as the conversation being flagged as "over".
I made the change, however, I'm getting the same result. I added debugging to show the value of "DialogueManager.standardDialogueUI.isOpen" and it is also returning false while the fade out is still in processes.
Re: IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 4:32 pm
by Tony Li
Hi,
The dialogue UI script was configured to wait for the sub-panels (subtitle, response menu) to close, but then to kick off the main panel's close animation and let it go on its own.
This patch changes it so it also waits for the main panel to close, which seems more appropriate:
[see below]
Also, on your dialogue UI make sure your StandardDialogueUI component's Conversation UI Elements > Wait For Close checkbox is ticked.
Re: IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 4:46 pm
by Vomdrache
After importing the package the dialogue UI becomes automatically active on play. Would that be a result in code from the changes or something on my end?
Wait For Close is selected.
Re: IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 4:49 pm
by Tony Li
Hmm, I'll check that now. It's probably related to the code changes in the patch.
Re: IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 6:33 pm
by Tony Li
Okay, sorry about that. It was an oversight in the patch. Should be all fixed here:
DS_DialogueUIPatch_2021-11-02a.unitypackage
Re: IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 7:13 pm
by Vomdrache
Amazing!
Absolutely amazing. Thank you so much Tony!
Works perfectly.
Re: IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 7:58 pm
by Vomdrache
Amazing!
Absolutely amazing. Thank you so much Tony!
Works perfectly.
Re: IsConversationActive returning false while the dialogue UI is still fading out
Posted: Tue Nov 02, 2021 8:05 pm
by Tony Li
Whew! Glad to help!