- Home /
How do I fix animation must be marked as legacy?
When I try to play the "Run" Animation it say's animation must be marked as legacy. When I go to debug mode it won't let me change the settings! Please Help!
Answer by Jrocker2002 · Jun 08, 2014 at 03:30 AM
I had a problem with this error before. To solve this error, select your animation, and when it shows up in the inspector window, click the icon next to the lock icon and click debug. If it doesn't let you change anything you might want to try clicking the lock button and that might change something. Hope this solved your problem.
Answer by MADLLAMA · Aug 23, 2014 at 06:22 AM
you can change animation type from 2 to 1 and check the frame rate i changed it to 30 and it worked.. and from default to looped.
Answer by phreakhead · Sep 10, 2017 at 03:20 AM
If you don't want to mark your animations as legacy, you can use the new Playables API to play non-legacy AnimationClips:
private List<PlayableGraph> graphs = new List<PlayableGraph> ();
// Just call this function when you want to play an AnimationClip on a specific GameObject.
// from https://docs.unity3d.com/Manual/Playables-Examples.html
private PlayableGraph playAnim(AnimationClip clip, GameObject obj) {
PlayableGraph playableGraph;
AnimationPlayableUtilities.PlayClip(obj.AddComponent<Animator>(), clip, out playableGraph);
// save all graphs we create and destroy them at the end of our scene.
// you might need to optimize this if you make a lot of animations.
graphs.Add (playableGraph);
return playableGraph;
}
void OnDisable() {
foreach (var g in graphs) {
g.Destroy();
}
graphs.Clear ();
}
Answer by yuriki · Jul 11, 2018 at 09:01 PM
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!
Your answer
Follow this Question
Related Questions
Having issues with the new Unity 4.5 Legacy Editor 0 Answers
Animation not playing 0 Answers
Animator not showing animation 1 Answer
Jump animation only plays for about 1/10 of a second unless the button is pressed twice 2 Answers
Why do legacy & humanoid animations look different on the same character? 1 Answer