Fading Dialogue With Bubble UI?

Announcements, support questions, and discussion for the Dialogue System.
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Re: Fading Dialogue With Bubble UI?

Post by igorsandman »

Hi,
I updated to the latest version of DS.

There are two issues.
Issue 1
To reproduce the issue where two lines of dialogue from the same actor make the bubble appear to blink, it's pretty straight forward. Create a dialogue with one single actor that has several successive lines of dialogue (with the bubble prefab).
You will see things in this order:
1. it displays dialogue line 1
2. you press the continue button
3. the text is changed to dialogue line 2 (abruptly, no fade)
4. the bubble and the text fade out.
5. the bubble and the text fade back in.

So it looks like it's blinking because the text is changed before the animation plays.

Issue 2
To reproduce the issue where a bubble set to Until Superceded remains visible when the following line has no text:
Create a dialogue for a bubble that has Visibility set to Until Superceded. Give it a first line of dialogue followed by an entry with a sequence and no text.
For exemple, sequence that pause for 3 seconds:

Code: Select all

SetContinueMode(false);

required SetContinueMode(true)@3;
Continue()@3;
If you play this dialogue, you will see the first line of dialogue remains visible during the pause sequence.
I tried setting it to Superced or Actor Change and set the sequence entry's actor to none, but it doesn't work.

Does my explanation make sense?

So to avoid Issue 1, I can set Visibility to Until Superceded, but then I get Issue 2.
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Fading Dialogue With Bubble UI?

Post by Tony Li »

Hi,

Thank you for the reproduction steps. This patch adds handling for Issue 1:

DS_BubblePanelPatch_2021-09-23.unitypackage

(The issue is that bubble panels that are not part of the list of panels assigned to the dialogue UI were not considered when waiting for panels to close. Make sure to tick Wait For Close on your bubble panel.)

Regarding issue 2 (which may not matter now), it's exactly as designed. The subtitle panel hasn't been superceded yet, so it stays onscreen. You could manually hide it in the node's Sequence, but there should be no need to do that if you use the patch to address Issue 1. The change in the patch will also be in version 2.2.21.

Here's my reproduction scene for Issue 1, which should work after importing the patch: (exported from Unity 2020)

DS_TestBubbleClose_2021-09-23.unitypackage
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Re: Fading Dialogue With Bubble UI?

Post by igorsandman »

Thank you for your hard work!
I will test the patch this week end. :)
WeakInteractive
Posts: 15
Joined: Fri Nov 20, 2020 4:21 pm

Re: Fading Dialogue With Bubble UI?

Post by WeakInteractive »

Okay, forget my stupid workaround, I should have just asked for a fix haha.

I tested the patch for "Issue 1," and it seems to work great, thank you!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Fading Dialogue With Bubble UI?

Post by Tony Li »

Glad to help! Thanks for the precise reproduction steps. They made it easy to identify the issue and address it.
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Re: Fading Dialogue With Bubble UI?

Post by igorsandman »

Hi,
I've been testing the patch.
It works great.
One little issue I have is when displaying a dialogue from the same actor, it's slower than when switching to a different actor since DS waits for complete close. A quick workaround I made is I changed the state speed in the animator of the bubble (hide and close states). It's not perfect but it's enough for me.
I suppose I will have to redo it every time I update the asset, so it would be great if the close/hide animation speed was included in the bubble settings.

Thanks again for the quick patch!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Fading Dialogue With Bubble UI?

Post by Tony Li »

If you use the same actor, what about changing the bubble panel's Visibility to Until Superceded?

Also, I recommend duplicating the panel's animator controller asset. Assign your duplicate copy to the panel. Then you can change the speed of the duplicate copy, and it won't be affected when you update the asset.
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Re: Fading Dialogue With Bubble UI?

Post by igorsandman »

Thanks for the suggestions. I'll experiment with those settings.
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Re: Fading Dialogue With Bubble UI?

Post by igorsandman »

Quick question about Superceded: how do I disable the bubble if I want a dialogue line to be followed by a sequence without text? Do I SendMessage then create a function that closes the bubble? What would be the code for that?
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Fading Dialogue With Bubble UI?

Post by Tony Li »

Yes, you could do that if you give the bubble panel a unique name such as IgorSubtitlePanel. Then use the SendMessage() sequencer command to call its Close method:

Code: Select all

SendMessage(Close, , IgorSubtitlePanel)
Alternatively, you could broadcast the message to the children of the speaker's GameObject without knowing the GameObject's name:

Code: Select all

SendMessage(Close, , speaker, broadcast)
It's useful because you don't have to give the bubble panel a unique name. However, be aware that it will call Close() on any scripts in the speaker's hierarchy that have Close() methods.

Alternatively, you could write a custom sequencer command that tells the speaker's subtitle panel to close.
Post Reply