Animation Must be marked as legacy

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):

  • Sprite
    • Sprite
      • Sprite

Any ideas?

I’ve recently ran into this exact same problem and I’ve found 2 ways to solve my issue, so I’m hoping I can help you.

EDIT---------------------------------------------------------------------------------

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.

I’ve found an easy way to resolve this problem.

  1. Open .anim file with an text editor.
  2. find string “m_Legacy: 0”
  3. change to “m_Legacy: 1”
  4. save the file.
  5. Done

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:

  1. Delete Animation component

  2. Add Animator component

  3. Inside Animation tab (don’t mix up with Animation component) hit Create button and save Dance.anim file (or use other name).

  4. Inside Animator tab select node Dance (name as above) and in Inspector choose your clip from FBX-file for Motion field.

That’s all!

Still facing the same issue and the accepted solution did not help

Unity version is 2019.2.18f1

-sikka

Fast updated answer: Select the fbx file which contains the animation. Select the Rig tab in the inspector and choose Legacy as Animation Type.