Dialogue Animation Show/Hide help

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Shinos
Posts: 59
Joined: Tue Jan 17, 2023 10:51 am

Dialogue Animation Show/Hide help

Post by Shinos »

Hi,
so i was trying to tinker with creating a new bubble speech, and since i couldn't find a way to make the "tail" of the bubble scale properly i thjought to keep it outside of the real bubble and make it kind of static, and this works really really well, there is only one problem, and that is that i need the tail to of course change it's transparency alongside the bubble, i thought that putting an animator and canvas group with the same animator controller on the tail could work, and it kinda does in the editor when testing the animations, but in game when the Convo starts for some reason it does not listen to the show/hide triggers, only the bubble does and changes its animation state , while when the dialogue begins the tails stays in a limbo of "start" state , so only the bubble shows up, and the tail don't, am i missing something ?
123123.png
123123.png (25.67 KiB) Viewed 375 times
123123123.png
123123123.png (51.99 KiB) Viewed 375 times
User avatar
Tony Li
Posts: 22119
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Animation Show/Hide help

Post by Tony Li »

Hi,

Try just one Animator on the Main Panel (the parent of Bubble Panel and Tail) that animates a Canvas Group component on Main Panel.
User avatar
Shinos
Posts: 59
Joined: Tue Jan 17, 2023 10:51 am

Re: Dialogue Animation Show/Hide help

Post by Shinos »

Thank you, i forgot to just do that x)
So i think how the system gets those trigger up is by finding the first animator in the subtitle panels and then hooking on it? Thought it could find every animator on it, my mistake, i was mislead by the opportunity to choose the name for the Triggers to find in the Subtitle Panel Ui component.
If i would ever want to expand further the animations another thing i could do/done is to rely on the On Open() and On close() events? Also i was curious, to which situation are the "Focus" and "Unfocus" animation referring to?
User avatar
Tony Li
Posts: 22119
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Animation Show/Hide help

Post by Tony Li »

Hi,

Yes, you could use the UnityEvents OnOpen(), OnClose(), and OnClosed(). (OnClose happens when the panel starts to close; OnClosed happens when the panel is finished closing.)

When a subtitle panel shows a subtitle, it does this:
  • Activates the subtitle panel GameObject.
  • Plays the Show animation.
  • Plays the Focus animation.
  • Shows the subtitle.
When the subtitle panel wants to close (e.g., when the subtitle is done, if Visibility is set to Only During Content), it does this:
  • Plays the Unfocus animation.
  • Plays the Hide animation.
  • Deactivates the subtitle panel GameObject.
If your Animator doesn't have Focus and Unfocus animations, that's fine. It's mostly used for visual novels where the speaker's portrait image appears in full color when speaking (Focus), and then becomes darker (Unfocus) when another character is speaking.
Post Reply