- Home /
I Need The Help Or Advice Of A Unity Animation Expert
I have a project that uses a fair amount of animation done on a UI canvas using frame by frame images or sprites. What happens is the animation loads and plays fine the very first time the canvas is loaded (Set Active) and it's associated Camera is also set active, BUT when that same canvas with the animation on it is called a second time it just shows the very last state of the Animation. So I'm not sure what I'm doing wrong that prevents the animation from starting from it's very beginning?
Hello! Any script on how you're calling the animation? Or any Animator settings you can share?
Thanks @jeffreyrampineda I'll attach some screen grabs of how I have things set up for you. In the first image you can see I have the Hierarchy set up pretty simple, the canvas panes are set to active same time as the cameras by the script. And then set not active after a few moments after the animation has played and then the main screen loads.
Here is a quick video that demos the eye blink if you like: https://youtu.be/5hj$$anonymous$$j3IJsmw
I'm no expert but the way I do animation for my UI objects is that I set conditions on animation transitions. Then from a script, I take the Animator component and call "SetTrigger()" method to change the animator's parameters to trigger conditions to open or close my UI object. Here is a tutorial https://www.youtube.com/watch?v=HrNebvxSUsU . Skip to 14:00 - 17:00.
I hope that helps!