exdev / ex2d

Documentation, runtime scripts and others of ex2D
www.ex-dev.com/ex2d
43 stars 9 forks source link

Substitute color in AnimationHelper should execute in LateUpdate() not Update(). #39

Closed ghost closed 12 years ago

ghost commented 12 years ago

As title, the logic for substituting color in every AnimationHelper have the same problem.

Because Unity's animation system samples between Update() and LateUpdate().

Say, I create a prefab that contains a sprite with alpha = 1, and attach an auto-played animation which starts from alpha=0. When I instantiate the prefab, it should act as a fade-in sprite.

But in this situation alpha in the first frame will be 1 (The Animation samples 0, but hasn't substituted by AnimationHelper). So there will be a 'blink artifact' while fading in.

jwu commented 12 years ago

You are right. I will fix the problem.

jwu commented 12 years ago

Fixed in v126 - 120712