- Home /
Button animation (transition) reset
Hi Everyone, I'm creating a (WorldSpace) UI with a button on it, which has an animator attached to it and the four default clips (normal, highlighted, pressed and disabled). I set up the clips so they have one frame only and let Unity do all the transition work for me. One of the buttons has an event which will disable the panel it's on (i.e. a "closing" button).
This all works fine. However, when I re-enable the panel later, the "closing" button's "normal" clip seems to have changed: It now starts half way between the "normal" and the "highlighted" position. How do I reset this animation?
I've tried Animator.CrossFade, no luck.
I got most of the animation-related ideas from http://blogs.unity3d.com/2014/06/30/unity-4-6-new-ui-world-space-canvas/ This seems to be related: http://answers.unity3d.com/questions/991509/cannot-reset-animation.html