Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Play animation on Game Object from script

$
0
0
Hi all. I have created an animation, a simple scale a position change. Now if I place that animation on my game object, the "Animator" component then gets added, at this point the animation starts looping or playing once, I don't want this, I want it to not play at all at the beginning and to be able to call it from script and play it. If I try to remove the "Animator" component, my "Animation" component doesn't play at all. setting it to "play automatically" or trying to call it from the script does not work. It just doesn't do anything. What am I missing? Do I need the animator component attached to a game object to play an animation or can I do without it and control it myself? It seems like the animator is connected to mechanim, but do you really need to use mechanim to play simple animations?

Viewing all articles
Browse latest Browse all 171066

Trending Articles