Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: DCalabrese on December 10, 2014, 08:47:59 PM

Title: Animating Panel Alpha is Inconsistent
Post by: DCalabrese on December 10, 2014, 08:47:59 PM
Looks like a possible bug, but here we go. I'm using classic Unity animations to animation the dialogs in my game. Everything is working great - except for panel alpha animations. In many cases it works, however for some UIs, it simply just doesn't animate. When previewing the animation while editing, and alpha value of the panel always animates - but get it into the game, and it almost seems to be a 50/50 chance on if it will work or not.

Is this a known issue? Or is animating panel alpha something I shouldn't be trying to do? :)

Thanks!
Title: Re: Animating Panel Alpha is Inconsistent
Post by: ArenMook on December 11, 2014, 09:03:34 AM
You're animating a private, hidden variable, "MAlpha". The fact that Unity shows it to you is a bug in Unity.

When working with NGUI, you should be working through properties, and Unity doesn't let you animate properties.

Solution is simple -- use an intermediate script. It's called AnimatedAlpha. Attach it, animate its alpha value instead.
Title: Re: Animating Panel Alpha is Inconsistent
Post by: DCalabrese on December 11, 2014, 04:55:18 PM
I had a feeling I was just doing it wrong - that works perfectly! Thanks ArenMook!