Search Unity

AnimationClip must be marked as Legacy

Discussion in 'Animation' started by Drunky, Nov 28, 2013.

  1. Drunky

    Drunky

    Joined:
    Nov 25, 2013
    Posts:
    11
    So I'm having a big problem. I am trying to create an melee attack animation. However when I create the attack there is no "Animation" component (Just "Animator") which means that I can't turn automatic Repeat off. After some searching I finally added the "Animation" component manually. I attached the "Attack" animation to the component, but now every time I try to play the animation I get the error
    "The AnimationClip 'Attack' used by the Animation component 'Mace_unity2' must be marked as Legacy." I searched around and found a way to mark it as legacy, but I suppose that that, is on an older version of Unity since I can't find it anywhere. So my question is :
    How can I mark an animation as legacy in Unity 4.3?
    Thanks
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Select the fbx file which contains the animation. Select the Rig tab in the inspector and choose Legacy as Animation Type.
    If you create the animation file on your own in Unity, I guess you can't use legacy anymore.
     
    156484134616498 likes this.
  3. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    159
    http://answers.unity3d.com/questions/577801/animation-must-be-marked-as-legacy.html
    you can hit "debug" on the animation component and manually turn the value to "1"


    note changes to anim files and use
    $animDebug.png
    2 = mecanim, attaching an anim with value type "2" as an animation component on a prefab is legacy and gives error
    [note "Wap Mode" methods are located in this debug inspector]

    $legacyOnly1.png
    There is no need to use a legacy component though; you can delete this component since it is ONLY legacy

    use the Animator with the Anim file that has Animation Type = "2" (that is the >=4.3 default)
    $animator.png
    drag it into the animator (mecanim).
    (*.Anim files marked Animtion Type 1(legacy) will not be able to be dragged into here)

    check on the normal inspector to make sure it doesn't loop time either
    $animNormalView.png
     
    Last edited: Jan 25, 2014
    mgear, CoughE, yuriki and 4 others like this.
  4. andrewcelticpiper

    andrewcelticpiper

    Joined:
    Apr 19, 2014
    Posts:
    1
    I have a problem when I go into debug mode the Animation Type bar is not even there. So could someone help it is really annoying!
     
  5. Choesul

    Choesul

    Joined:
    Mar 15, 2015
    Posts:
    1

    Thank You So much!
    great! Perfect!
    this guide is very helpful to me
     
  6. JackTheKreator

    JackTheKreator

    Joined:
    Mar 29, 2016
    Posts:
    6
  7. phreakhead

    phreakhead

    Joined:
    Sep 5, 2017
    Posts:
    2
    If you don't want to mark your animations as legacy, you can use the new Playables API to play non-legacy AnimationClips:


    Code (CSharp):
    1.  
    2. private List<PlayableGraph> graphs = new List<PlayableGraph> ();
    3.  
    4. // Just call this function when you want to play an AnimationClip on a specific GameObject.
    5. // from https://docs.unity3d.com/Manual/Playables-Examples.html
    6. private PlayableGraph playAnim(AnimationClip clip, GameObject obj) {
    7.     PlayableGraph playableGraph;
    8.  
    9.     AnimationPlayableUtilities.PlayClip(obj.AddComponent<Animator>(), clip, out playableGraph);
    10.  
    11.     // save all graphs we create and destroy them at the end of our scene.
    12.     // you might need to optimize this if you make a lot of animations.
    13.     graphs.Add (playableGraph);
    14.  
    15.     return playableGraph;
    16. }
    17.  
    18. void OnDisable() {
    19.     foreach (var g in graphs) {
    20.         g.Destroy();
    21.     }
    22.     graphs.Clear ();
    23. }
    24.  
     
  8. Tigersong

    Tigersong

    Joined:
    Aug 11, 2014
    Posts:
    52
    I'm using the standard assets (just 2D and cross-platform input), which don't seem to include any .fbx files. Help?
     
    bugfinders likes this.
unityunity