- Home /
Question by
Tutankhamen · Apr 10, 2013 at 02:22 AM ·
animation
AnimationClip and AnimationState
I have Animation class which contain 3 animation clips. So, GetClipCount() returns 3:
Animation animation = subject.GetComponent<Animation>();
animation.GetClipCount();
but when I try to enum AnimationState:
foreach (AnimationState clip in animation) {
Debug.Log("Clip name is " + clip.name + ", length: " + clip.length + "sec");
}
it enumerates only 2 AnimationStates. So, why it could happen and how can I create AnimationState for every my AnimationClip?
Thank You.
Comment
Probably, because Unity doesn't create animation states for animations that aren't used, but I'm not 100% sure on that
Yes, i know that, but questions are "why?" and "how to fix it?".
Your answer
Follow this Question
Related Questions
How To Get Current Animation Name 3 Answers
Flash raw animation data to Unity 0 Answers
Humanoid animation issue 0 Answers
Add mixing transform to some parent transforms but not specific children? 0 Answers
Photon animation issue 0 Answers