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...
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...
Though I've never tried, it seems like you could use set the Animation WrapMode to WrapMode.Loop.
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 :)
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 :)