- Home /
Play an animation when UI button is pressed
Now I have a canvas with a button. I'd like to realize that when I press the button, then it can play my animation. In fact it is animation about opening a door(I download from asset store http://u3d.as/9hZ). I tried to make an onclick function. Drag the door to the onclick , choose the Animation, then drag the animation (called open) to the AnimationClip part. But it didn't work. So I wonder should I write a script and where should I put the script to? Could someone help me? Thank you.
Comment
Your answer
Follow this Question
Related Questions
How can I make UI button animaion using spritesheet? 0 Answers
How to make a button that opens and closes a tab? 1 Answer
Menu Animation 2 Answers
Button animation (transition) reset 0 Answers