Hello,
How to remove all AnimationClips from Animation via script? The same as set Size in editor to 0 but from script. I'm trying do do so:
while ( animation.GetClipCount() > 0 )
for (var state : AnimationState in animation)
if ( state )
{
animation.RemoveClip( state.clip );
break;
}
but the Unity crashes if there is a clip marked in editor as "None". Can't find out why is it so.
Is it another way? Or I'm doing something wrong?