- Home /
Animation - Forcing To Start at X Frame
Hello everyone. I've had a problem with some animations.
Is there any possible way to start an animation from X frame?
I have a GUI repeat button, to which I want to press...while this button is pressed play animation, if I press the button again I want the animation to run from the third frame && loop the whole animation while the button is pressed. Is there any way to force this?
Thanks for your time!
Answer by cariaga · Dec 15, 2014 at 04:23 PM
This
animation["MyAnimation"].time =7.0;
or even this
var desired_play_time = 5.3;
animation["MyAnimation"].time = desired_play_time;
animation["MyAnimation"].speed = 0.0;
animation.Play("MyAnimation");
hope i understand correctly :)
Thank you for your time. I forgot to note that Im using an animator Controller. Your solution, as awesome as it sounds makes me attach an animation component, which would defeat the purpose of using an animator controller :/
@$$anonymous$$ii unity has a built in animation editor that comes with mecanim i think thats what you looking for. you can even split animations with it