Any tips to avoid jumpy Dialogue Panels?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
redisthecolor
Posts: 9
Joined: Sat Dec 12, 2020 11:56 am

Any tips to avoid jumpy Dialogue Panels?

Post by redisthecolor »

Hi there,

first of all thanks for the great asset! Thank God I got to snatch it last minute from the Asset Store Sales.

So yeah I was playing around a bit with Dialogue System and wonder how can I avoid jumpy effect between each dialogue panel when a new dialogue is show?

Any tips to make the panel more user friendly? Looking forward to your input! <3
Last edited by redisthecolor on Tue Dec 29, 2020 8:09 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Any tips to avoid jumpy Dialogue Panels?

Post by Tony Li »

Hi,

Thanks for using the Dialogue System! It looks like it's using a Content Size Fitter to resize to the current content. There are a couple of things you can do:

1. Untick the subtitle panel's Clear Text On Close checkbox.

2. Set a minimum size for the panel. (Add a Layout Element component and set the Minimum Height.)

3. Or, if you don't want the panel to auto-adjust to fix the content size, remove the Content Size Fitter and use a fixed size. In many cases I prefer a fixed size. It makes the UI look more stable.
redisthecolor
Posts: 9
Joined: Sat Dec 12, 2020 11:56 am

Re: Any tips to avoid jumpy Dialogue Panels?

Post by redisthecolor »

Hi Tony,

it looks way better now thank you!

The last thing that bothers me is the way the response panel fades away. It took like a good second and then the subtitle panel just slide off to the bottom awkwardly. My question:

  • Is there away to keep the response panel visible after player selected the option? (the selected option will be highlighted and the panel will fade away together with the subtitle panel)
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Any tips to avoid jumpy Dialogue Panels?

Post by Tony Li »

Hi,
redisthecolor wrote: Sat Dec 12, 2020 4:34 pmIs there away to keep the response panel visible after player selected the option?
Inspect the dialogue UI's Response Menu Panel GameObject. Remove the Animator component. Clear the Standard UI Menu Panel component's Show Animation Trigger and Hide Animation Trigger fields. Untick Deactivate On Hidden.
redisthecolor
Posts: 9
Joined: Sat Dec 12, 2020 11:56 am

Re: Any tips to avoid jumpy Dialogue Panels?

Post by redisthecolor »

Tony Li wrote: Sat Dec 12, 2020 7:44 pm Hi,
redisthecolor wrote: Sat Dec 12, 2020 4:34 pmIs there away to keep the response panel visible after player selected the option?
Inspect the dialogue UI's Response Menu Panel GameObject. Remove the Animator component. Clear the Standard UI Menu Panel component's Show Animation Trigger and Hide Animation Trigger fields. Untick Deactivate On Hidden.
Beautiful. It works.

One little problem though. When player selects a button, the normal color is supposed to change to Red. But seems like the style of the button is reseted after the player made a selection

Code: Select all

public void ToggleButtonSelectedColor()
    {
        theColor.normalColor = theButton.colors.selectedColor;
        theColor.highlightedColor = theButton.colors.highlightedColor;
        theColor.pressedColor = theButton.colors.pressedColor;
        theColor.selectedColor = theButton.colors.selectedColor;
        theColor.disabledColor = theButton.colors.disabledColor;

        theButton.colors = theColor;
    }
This code is called on OnClick(). But seems like it didn't work. Is there any step that I missed here?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Any tips to avoid jumpy Dialogue Panels?

Post by Tony Li »

Hi,

The Standard UI Menu Panel component disables the buttons after the player clicks one. This prevents the player from clicking any of the buttons again.

Try changing the button's Disabled color to the same as the Clicked color or Selected color.
redisthecolor
Posts: 9
Joined: Sat Dec 12, 2020 11:56 am

Re: Any tips to avoid jumpy Dialogue Panels?

Post by redisthecolor »

Nice. It works! Thanks!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Any tips to avoid jumpy Dialogue Panels?

Post by Tony Li »

Happy to help!
redisthecolor
Posts: 9
Joined: Sat Dec 12, 2020 11:56 am

Re: Any tips to avoid jumpy Dialogue Panels?

Post by redisthecolor »

Hi Tony,

in which part of the code / UI do I need to change if I want the ResponsePanel to hide itself (after the conversation ends) // or when a new conversation starts? Because when a new conversation starts, the old ResponsePanel is still visible.

Thanks!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Any tips to avoid jumpy Dialogue Panels?

Post by Tony Li »

Hi,

Let's figure out why the response menu panel is still visible. It shouldn't be visible.

- Are there any errors or warnings in the Console window?

- Is the response menu panel's Standard UI Menu Panel assigned to the Standard Dialogue UI component's Conversation UI Elements > Menu Panels and Default Menu Panel?

- Is the Standard UI Menu Panel's Panel field assigned?

- Are you using a prefab dialogue UI? Or one you made from scratch? If it's a prefab (or based on a prefab), which one?
Post Reply