Page 1 of 1

possible (minor) animation fade-in bug?

Posted: Sat Oct 17, 2015 9:31 am
by Arcanor
I'm noticing when using either the "Slide Right Canvas Group Animator Controller" or the "Canvas Group Animator Controller" that there's a single-frame "flash" of the empty dialogue window before the Canvas Group's alpha is reset by the animation from 1 to 0, and then starts fading back up to 1 again.

I've already set the Canvas Group to 0 Alpha before the scene begins. However, as soon as the first conversation starts it is set to 1 and never resets back to 0 (unless animated temporarily).

I think the dialogue manager is setting this to 1 during the first conversation, but forgetting to reset it back to its original value after the conversation ends.

Maybe I can work around this issue by resetting the Canvas Group alpha back to 0 in my HideSubtitle() override?

Re: possible (minor) animation fade-in bug?

Posted: Sat Oct 17, 2015 9:53 am
by Arcanor
I've added the following line of code to both my ShowSubtitle() and HideSubtitle() overrides:

Code: Select all

dialogue.panel.gameObject.GetComponent<CanvasGroup>().alpha = 0;
The fade-in is now working properly, without the "one frame flashing" that I mentioned earlier.

Re: possible (minor) animation fade-in bug?

Posted: Sat Oct 17, 2015 10:36 am
by Tony Li
That's the way to do it. The Dialogue System doesn't get control of UI elements until after the first frame, at which point they've already been visible for one frame.

BTW, there's an updated Unity UI support package on the customer download page. It includes some minor improvements to the way animations are handled as well as a "Queue Alerts" checkbox.

Re: possible (minor) animation fade-in bug?

Posted: Sat Oct 17, 2015 10:49 am
by Arcanor
Thanks Tony, I will download that update now so I can have the latest animation refinements.