Hi,
I want to add the animation clips to a character programatically since they keep going missing whenever we do an update from the asset server! Crazy!
I've tried clearing the array in the inspector then doing this:
animation.AddClip(animation.clip, "Male_Walk");
which adds the clip to the array (I can see it in the inspector) but it will not play.
I've also tried doing this:
AnimationClip[] animationClips = new AnimationClip[1];
animation.AddClip(animationClips[0], "Male_Walk");
AnimationUtility.SetAnimationClips(animation, animationClips);
But that doesn't seem to set the array at all (nothing in the inspector)
What am I doing wrong?
Thanks