- Home /
Question by
derrtyones · Jul 14, 2014 at 08:00 PM ·
animationjavascriptyieldlength
Animation length of other object
I need to find the animation length of an animation which is attached to a different object.
First I play the animation:
GameObject.Find("myObject").animation.Play("jump");
After this line I want to yield WaitForSeconds(animation.length). But how? I tried:
var length = GameObject.Find("myObject").animation.length("jump");
Comment
Best Answer
Answer by roojerry · Jul 14, 2014 at 08:04 PM
Check the documentation.
Animation doesn't have a length function, but an AnimationClip has a length variable, as does an AnimationState
Your answer