IsConversationActive returning false while the dialogue UI is still fading out

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Vomdrache
Posts: 21
Joined: Wed Aug 18, 2021 1:00 pm

IsConversationActive returning false while the dialogue UI is still fading out

Post 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.

Image

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?
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: IsConversationActive returning false while the dialogue UI is still fading out

Post 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.
Vomdrache
Posts: 21
Joined: Wed Aug 18, 2021 1:00 pm

Re: IsConversationActive returning false while the dialogue UI is still fading out

Post 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.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: IsConversationActive returning false while the dialogue UI is still fading out

Post 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.
Vomdrache
Posts: 21
Joined: Wed Aug 18, 2021 1:00 pm

Re: IsConversationActive returning false while the dialogue UI is still fading out

Post 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.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: IsConversationActive returning false while the dialogue UI is still fading out

Post by Tony Li »

Hmm, I'll check that now. It's probably related to the code changes in the patch.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: IsConversationActive returning false while the dialogue UI is still fading out

Post 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
Vomdrache
Posts: 21
Joined: Wed Aug 18, 2021 1:00 pm

Re: IsConversationActive returning false while the dialogue UI is still fading out

Post by Vomdrache »

Amazing!

Absolutely amazing. Thank you so much Tony!

Works perfectly.
Vomdrache
Posts: 21
Joined: Wed Aug 18, 2021 1:00 pm

Re: IsConversationActive returning false while the dialogue UI is still fading out

Post by Vomdrache »

Amazing!

Absolutely amazing. Thank you so much Tony!

Works perfectly.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: IsConversationActive returning false while the dialogue UI is still fading out

Post by Tony Li »

Whew! Glad to help!
Post Reply