I’ve seen responses to this question for meshes, but I’m asking this question in regards to 2D sprites that are nested.
I have three sprites that I have animated using the animation editor in Unity3D for a 2D game. When I try to play the animation, Unity gives me a warning:
The AnimationClip ‘Punch2Carl’ used by the Animation component ‘Carl_0013_ArmBak1’ must be marked as Legacy.
UnityEngine.Animation:AddClip(AnimationClip, String)
I am not using a mesh, so I cannot mark the animation as legacy in the inspector. I’ve tried finding a legacy property for the animation, but I haven’t seen it in the properties.
Afterwards, the animation will not play. The animation does play in the animation editor fine.
The setup of the game objects that are all animated (nested):
This post is becoming aged but keeps popping up so I’ll add an edit. Since the original post I’ve been made aware of an easier way to mark your animation files as Legacy:
If you select your animation in the Project window, then go to the top
right corner of the Inspector window
and select Debug from the drop
down menu (next to the lock), then
change the Animation Type to 1 will mark it as Legacy.
I’m not sure if you did, but when I
created my original animation
files, I did so inside of the
“Project” window. Try adding an
animation component to the sprite
you want to animate, then open the
animation window and select
“[create new animation]” in the
drop down menu. Doing it this way
seems to create the new animation
with the legacy animation flag set.
This way you can completely avoid
the warning or need for editing
animation files.
I hope this solves your issue, I know how frustrating it was for me.
Is anyone else being told that legacy clips cannot be in Animation Controllers? The compiler error says to mark the clip as legacy, and then the next error says that legacy clips cannot be in Animation Controllers.
Just throwing this out there, but I ran into this problem and although I set the Animation to ‘Legacy’, it would not recognize this. A simple re-launch of Unity fixed it. Try it, who knows!
I fought with this error all day long! Nothing above didn’t help me (because my animation was not inside .anim-file but inside .fbx-file) What helped me is this:
Delete Animation component
Add Animator component
Inside Animation tab (don’t mix up with Animation component) hit Create button and save Dance.anim file (or use other name).
Inside Animator tab select node Dance (name as above) and in Inspector choose your clip from FBX-file for Motion field.