Animate Subtitle Panel Only During Actor Change

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Dandy
Posts: 6
Joined: Tue Apr 20, 2021 5:13 pm

Animate Subtitle Panel Only During Actor Change

Post by Dandy »

I have a Standard Dialogue UI panel set up with an NPCSubtitle panel and a PCSubtitlePanel. I'd like when the actor changes (from PC to NPC) for the Show/Hide animations to play for their panels. If I configure them with animations right now, instead in between every line of dialogue they show and hide.
Dandy
Posts: 6
Joined: Tue Apr 20, 2021 5:13 pm

Re: Animate Subtitle Panel Only During Actor Change

Post by Dandy »

If I add the animator with Show/Hide and set the panel to Until Superceded it almost works, but for the first time that each actor begins speaking, there is a large delay until they start, and during this delay the next actor can be opened.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animate Subtitle Panel Only During Actor Change

Post by Tony Li »

Hi,

I'm not quite sure I understand. Try changing the panels' Visibility dropdowns to Always From Start or Always Once Shown. If that doesn't help, you could try hooking the animation into the OnFocus() and OnUnfocus() UnityEvents. And if that doesn't do the trick, would you please post some screenshots or mock-ups of what's going on now versus what you want to happen?
Dandy
Posts: 6
Joined: Tue Apr 20, 2021 5:13 pm

Re: Animate Subtitle Panel Only During Actor Change

Post by Dandy »

Hi Tony,

Basically what I want is for the players subtitle to be in a panel that animates in when they are speaking, and once the dialogue switches to an npc animate out the PCSubtitle and animate in the NPCSubtitle.

I tried setting the visibility to Always Once Shown but this causes them to overlap. Until Superceded seems to be the setting I desire, the only remaining issue is that the panels don't wait for the close animation before opening.
Dandy
Posts: 6
Joined: Tue Apr 20, 2021 5:13 pm

Re: Animate Subtitle Panel Only During Actor Change

Post by Dandy »

Focus and Unfocus worked perfectly. Thank you for your help!
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animate Subtitle Panel Only During Actor Change

Post by Tony Li »

Happy to help! Thank you very much for the nice review!
Post Reply