Have a weird problem with animation component.
I’m trying to iterate through animation clips in it, using states (is there any alternatives?).
There are clips in Animation component, but looks like array of states is empty.
How can i get list of all clips in Animation?
Animation anim = GetComponent<Animation>();
Debug.Log(anim.GetClipCount());
Debug.Log("States in animation:");
foreach (AnimationState state in anim)
{
Debug.Log(state);
}

