Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mcarriere

Pages: [1]
1
Support / Re: tk2sSprite - adjust alpha
« on: April 29, 2012, 04:29:57 pm »
I have a similar question, and I figured that it was close enough along the lines of this that making a new thread would be unnecessary.

I originally tried using Unity's animation to animate the alpha of the color property of a sprite. This didn't work.

However, when I change the color value in script, doing something along the lines of this, it works:

Note: direction changes from -1 to 1, depending if color is 1 or 0, and this is run in Update()

Code: [Select]
Color deltaColor = textLoading.color;
deltaColor.a += direction * Time.deltaTime;

textLoading.color = deltaColor;

Can someone explains why I cannot animation the alpha in a Unity Animation?

Pages: [1]