Main Conversation Panel State is wrong (stays opening/closing)

Announcements, support questions, and discussion for the Dialogue System.
Alexis
Posts: 11
Joined: Fri Oct 16, 2020 11:34 am

Main Conversation Panel State is wrong (stays opening/closing)

Post by Alexis »

Hi! I've read forum posts on this and the documentation, but I'm having issues even with the Bubble Subtitle Test Scene.

Basically, I have a main subtitle Panel that is linked as the Dialogue UI in the Dialogue System Controller. It is used for most full screen conversations between named actors. However, I want some conversations to play on different Dialogue UI if they're using the "NPC" actor. Those are for non-named actors and play automatically without player input. I play those by passing the gameobject that contains the Dialogue Actor which links to an instantiated subtitle panel. See Screenshot.
DialogueSystem_01.png
DialogueSystem_01.png (68.61 KiB) Viewed 786 times
Everything seems to work well at first. The lines with "NPC" as the actor play on the correct subtitle panel linked on object "UI_ModifierDisplayer_Leader". Yay!

However, As soon as another dialogue play on the Main Subtitle Panel, it stays in "closing" state at the end of the subtitles. This then causes it to reappear when any other dialogue is triggered on a different UI because the gameobject is still active.
DialogueSystem_02.png
DialogueSystem_02.png (96.85 KiB) Viewed 786 times
I've noticed it also stays "opening" while the dialogue plays. It only even becomes "closed" on the first frame when starting a new dialogue on the same UI, then becoming opening and being stuck on closing again.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Main Conversation Panel State is wrong (stays opening/closing)

Post by Tony Li »

Hi,

Try this: Add an Override Dialogue UI component to the "NPC" Dialogue Actor's GameObject. Assign the Basic Standard Dialogue UI prefab to its UI field.

Explanation:

When you start a conversation, it always opens a complete dialogue UI, even if the conversation ends up only showing subtitle text in separate bubble panels. This is so the dialogue UI is ready in case a line ends up going to one of the regular subtitle panels. We can't know ahead of time because [panel=#] and SetPanel() sequencer commands can have dynamic values such as [panel=[var=panelNum]] or SetPanel(NPC, [var=panelNum]).

By telling the NPC GameObject to use an instance of the Basic Standard Dialogue UI, it doesn't touch the dialogue UI that's assigned to the Dialogue Manager GameObject's Dialogue System Controller > Dialogue UI field. The Basic Standard Dialogue UI is a fairly invisible UI that only shows UI elements when it actually needs to show content, such as showing a subtitle in one of its panels.
Alexis
Posts: 11
Joined: Fri Oct 16, 2020 11:34 am

Re: Main Conversation Panel State is wrong (stays opening/closing)

Post by Alexis »

Hi Tony,
Really appreciates the quick support!

Your solution does work if I put my Dialogue UI Prefab in the UI fcield of OVerride Dialogue UI. However, it's because it now instantiate a second GameDialogue UI when a conversation happens, then destroys it at the end.
DialogueSystem_03.png
DialogueSystem_03.png (9.04 KiB) Viewed 782 times
However, If I reference the existing Dialogue UI in the override, the same problem happens. The StandardUIDialoguePanel stays in "closing" and "opening" state. After more debugging, I've found that if I untick the "'Deactivate on Hidden" on the parent UI Panel, the StandardUIDialoguePanel does end up going from "closing" to "closed" in about five seconds. I'm now investigating if an animation or something is blocking the panel from transitioning to "closed" fast.

Another clue : If I tick the "Wait for Close" in the StandardUIDialoguePanel, It now takes the five second to transition to the next subtitle entry.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Main Conversation Panel State is wrong (stays opening/closing)

Post by Tony Li »

Is it closer to 10 seconds? When trying to play a show or hide animation, the dialogue UI will time out after 10 seconds.

You can add an instance of the Basic Standard Dialogue UI to the NPC and assign that instance to the Override Dialogue UI component. This way it doesn't have to instantiate or destroy the UI.
Alexis
Posts: 11
Joined: Fri Oct 16, 2020 11:34 am

Re: Main Conversation Panel State is wrong (stays opening/closing)

Post by Alexis »

Indeed, it is closer to 10 seconds. Removing the animator fixes the issue, so I will go read up again on the animation in the documentation. I'm pretty sure the issue is coming from my custom Animator that is not communicating properly to the panel that it's completed!

Will update with the specific problem I was having when I find it.
Alexis
Posts: 11
Joined: Fri Oct 16, 2020 11:34 am

Re: Main Conversation Panel State is wrong (stays opening/closing)

Post by Alexis »

I fixed the issue by creating a new animation layer in my custom animator and making sure the default layer constains the states from the example. I had to remove the "Hide" animation trigger because it would hide the panel between every subtitles. Will have to investigate this, but at least I have the correct behavior and I understand what was happening :)

Here's my animator and visibility options right now :
DialogueSystem_04.png
DialogueSystem_04.png (38.31 KiB) Viewed 780 times

Thanks Tony for the tips!
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Main Conversation Panel State is wrong (stays opening/closing)

Post by Tony Li »

Hi,

If you don't want to hide the subtitle panel between lines, change the subtitle panel's Visibility dropdown to anything except Only During Content.
Alexis
Posts: 11
Joined: Fri Oct 16, 2020 11:34 am

Re: Main Conversation Panel State is wrong (stays opening/closing)

Post by Alexis »

Sounds Great!
My issue is solved, thanks again for this plugin!
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Main Conversation Panel State is wrong (stays opening/closing)

Post by Tony Li »

Glad to help!
kuchlog25
Posts: 1
Joined: Tue Jul 05, 2022 4:09 am

Re: Main Conversation Panel State is wrong (stays opening/closing)

Post by kuchlog25 »

Is it closer to 10 seconds? When trying to play a show or hide animation, the dialogue UI will time out after 10 seconds. hellodear.in

teatv.ltd
Last edited by kuchlog25 on Thu Jul 07, 2022 1:40 pm, edited 1 time in total.
Post Reply