Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: charlym on January 29, 2015, 11:11:07 AM
-
Hi. I've created an animation using the Unity built-in animation curves and dope sheet. The main object has a structure where some objects are UISprites. I have different animation curves controlling the Mcolor.a (alpha) independently for each one, in order to make them appear in sequence.
The problem I have is that for some of them the animation works fine, but for the others (even when I can see the value changing in the built in animation tool) doesn't show the UISprite at all. Even more, sometimes it shows one or more of them, but it seems to be affected by which of the objects is selected in the editor.
Could you please help me understand what's going on?
Thank you.
Charly.
-
MColor is a private variable that should not be exposed to scripts. The fact that Unity has access to it is a very old bug in Unity itself. When working with NGUI, you are always working through properties, never through member variables.
To animate a color, use an intermediate script -- AnimatedColor.
-
Thank you very much, that solved my problem.