- Home /
Not playing whole animation
Facing weird problem with splitting animation, everything fine but when I call "idle" animation it doesn't play all frames.
public class animControl: MonoBehaviour {
private Animation mainAnimation;
//public AnimationClip idle;
// Use this for initialization
void Start () {
mainAnimation= GetComponent<Animation>();
mainAnimation.clip.legacy = true;
mainAnimation.AddClip(mainAnimation.clip, "_idle", 0,99);
mainAnimation.wrapMode = WrapMode.Loop;
mainAnimation["_idle"].layer = -1;
mainAnimation.Stop();
mainAnimation.Play("_idle");
}
}
I tried to change all frames number but still it doesn't play more than 30 frames.
Comment