- Home /
Question by
neonfire · Jul 11, 2011 at 12:26 PM ·
animationeditoranimationutility
"default clip could not be found in attached animation" error
I'm using a Unity custom editor class to duplicate animation clips, do some basic realignment using AnimationUtility and then load them onto a model to play. Whenever I duplicate an animation clip and run it though the script straight away I get the error "default clip could not be found in attached animations". However, if I manually attach the .anim animation clip to the model using the inspector and play it once before running the script it works fine. Any ideas as to what's up here?
At the minute I'm just hitting ctrl-D to duplicate the animation files, the code I'm using to attach them to the mesh is:
ani.Stop();
ani.clip = cc;
ani.Rewind();
ani.Play();
Thanks
Comment