- Home /
How do i repeat the animation?
This is a simple question... and the title pretty much explains it all... I have an animation that is about 2 seconds long and i want it to repeat. any ideas on how i should do so?
Thanks in advance to any help brought towards this topic...
Answer by · Oct 09, 2010 at 02:39 AM
Though I've never tried, it seems like you could use set the Animation WrapMode to WrapMode.Loop.
Answer by MC HALO · Oct 09, 2010 at 03:10 AM
Ok thats simple this is what you have to do:
function Start () {
gameObject.animation.wrapMode = WrapMode.Loop;
gameObject.animation.Play("Put your animation name over here");
}
you can also do this on the function update as well that's completely up to you but the Start Function will make it play as soon as you run the game.
The other way is if you make your animation in unity drag save it and look for it in the "hierarchy" and click on the animation and from there you will have options. these options include Play Once, Loop and etc i hoped this helped :)
Answer by Kashaunzilla · May 09, 2011 at 09:29 PM
NOW CODING IS NEEDED FOR THIS DUDE! Just go to the animation in the project view and change it from default warpmode to loop or pingpong. Look starts it over when it reaches the end. Pingpong makes it start from the end and keeps going back and forth like a pingpong ball :)
Your answer

Follow this Question
Related Questions
Abaut Mecanim animation roop 0 Answers
particles emitter loop 1 Answer
My animation only plays on loop 1 Answer
Animation method/coroutine playable once or loop 0 Answers
Setting animation files' wrapmode 0 Answers