- Home /
The question is answered, right answer was accepted
Code Animation Length?
Hello Unity3D.I have a question about my animations?Is there a way for me to code my animation length instead of using the clamp range method?For example,I have an animation that is only 7 frames but everytime i import an animation unity3D insist of making them 150 frames.But the animation is only 7 is there a way that i can code the animation to only be 7 frames?
There's also a handy script available that loads all animations of a given model at game start, so you don't have to do it by hand in the editor. Search for "Animation clip loading start" or something.
Answer by markzareal · Nov 02, 2014 at 12:47 AM
So are you trying to stop the animation in a certain time? If so, you can use this:
var walk : Animation;
function Start () {
yield WaitForSeconds (7);
animation.Stop("walk");
}
Oh....Duh....why didn't i think of that before?!?.Anyways,Thank You For Your Help
Your answer
Follow this Question
Related Questions
SpriteManager 2 1 Answer
Enemy circles player instead of attacking. 1 Answer
One animation for character controller 1 Answer
A node in a childnode? 1 Answer