Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
15
Question by Itstame · Nov 18, 2013 at 04:12 AM · animation2dspritesprites

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?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nowherebrain · May 19, 2015 at 08:58 AM 0
Share

$$anonymous$$ine is still greyed out....I cannot copy it, and I am having a lot of trouble co$$anonymous$$g to grips with this...scripting it would be easier for me, but I just want to do a few idle animations for object and keep things as simple as possible. This is more of a "your answer did not work for me" than an actual answer...and I don't want to keep opening up new questions for the same issue.

7 Replies

· Add your reply
  • Sort: 
avatar image
103
Best Answer

Answer by Key_Less · Nov 18, 2013 at 05:38 PM

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.

Comment
Add comment · Show 38 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Itstame · Nov 18, 2013 at 07:25 PM 1
Share

1) Ah! This fixed it! Thanks for the tip! I've modified the asset files before, so I should have thought of this, but I'd been wrangling with this issue for hours that I was quite disgusted with the problem. Thanks!

2) This is how I made the animation, aside from doing it in the project as I used the hierarchy to make the animation on a game object in the scene. I'll try this method in the future.

avatar image MikeTon · Dec 23, 2013 at 04:13 PM 0
Share

Was stuck on this too. Thanks for the fix.

avatar image SnapOut · Dec 31, 2013 at 02:45 PM 0
Share

Thank you for this. Great reply, worked for me.

avatar image eestlane516 · Jan 01, 2014 at 12:42 AM 0
Share

Awww yea, thanks!!!!!!

avatar image derekwsparks · Jul 26, 2014 at 08:43 PM 1
Share

I cant change the animation type to 1 because it is greyed out. Its current setting is 2. How would I get it to where I can make the edits.

avatar image theBROWNbanditP derekwsparks · Aug 12, 2014 at 07:53 PM 1
Share

@derekwsparks, I had the same problem you did. When you look at the setting in the inspector it has all the options greyed out so you can't change anything. Whatever is the "master parent" (how it lists in the Hierarchy panel) for your model, go to that in the Project panel. In the Inspector panel, you should be able to change the settings in either "normal" or "debug" view, under the Rig tab, you will see Animation Type, and change that to Legacy. I'm not sure but I think the reason you have to change settings in the master parent, is all the children were imported into Unity as children, and should be modified through it's parent. I didn't make Unity so it's just a guess. Hope this fixes your problem.

avatar image RandomCharacters derekwsparks · Feb 21, 2015 at 05:05 AM 2
Share

If it's greyed out...then 'd' duplicate the animation. Then change new ones to '1'.

avatar image Deathsummer derekwsparks · May 02, 2015 at 05:12 AM 0
Share

and you save my life xD thanks!

Show more comments
Show more comments
avatar image
7

Answer by catiegee4 · Jan 28, 2016 at 01:27 PM

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.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JBehreandt · Mar 07, 2016 at 07:33 AM 1
Share

Hi redu4ia,

I'm using Unity 5.3.2f1, and I experience a problem similar to yours, because my project involves 2D sprite sheets. When I mark an animation clip as legacy in the debug inspector, I next receive a warning, "The legacy Animation Clip 'animation' cannot be used in the State 'animState'. Legacy AnimationClips are not allowed in Animator Controllers." The work-around I'm experimenting with involves not marking my animations as legacy, then in my animator controller assigning them to my animation states but not making any transitions except for the Entry. I then write my own animation script, using this as a reference: http://docs.unity3d.com/$$anonymous$$anual/AnimationScripting.html . Unfortunately, that means co$$anonymous$$g up with your own state machine in a code with an uncertain future.

 using UnityEngine;
 
 public class Anim : $$anonymous$$onoBehaviour {
     public Animator animator;
     public float transitionDuration = 0.0f;
     private int idle = 0;
     public int durationToChange = 0;
     public int durationThreshold = 200;
     public string idleString = "Idle0";
 
     void Awake() {
         if(animator == null) animator = this.gameObject.GetComponent<Animator>();
     }
 
     void OnEnable() {
         animator.Play("Idle0");
     }
 
     void Update() {
         if(Player.S.isGrounded) {
             if (Actions.S.forward > 0 || Actions.S.backward < 0) {
                 if (Actions.S.run > 0) {
                     animator.CrossFade("Run", transitionDuration);
                 } else {
                     animator.CrossFade("Walk", transitionDuration);
                 }
             } else {
                 animator.CrossFade(idleString, transitionDuration);
             }
         } else {
             animator.CrossFade("Jump", transitionDuration);
         }
 
         durationToChange++;
         if(durationToChange >= durationThreshold) {
             idleString = chooseIdle();
             durationToChange = 0;
         }
     }
 
     string chooseIdle() {
         idle = (idle + 1) % 3;
         return "Idle" + idle;
     }
 
 }

alt text

animscreencap.png (17.8 kB)
avatar image Poppers73 · Jan 04, 2018 at 02:46 AM 0
Share

I had the same problem. I had an Animation and an Animator component on my Game Object. It seems that's not allowed. The Animation component even was deactivated, that's why I paid no attention to it. Removing the Animation component solved the issue.

avatar image amirl_unity Poppers73 · Apr 29, 2018 at 07:42 AM 0
Share

@poppers73 for me i require an Animation component

avatar image amirl_unity · Apr 29, 2018 at 07:41 AM 0
Share

thats what happens to me

avatar image
3

Answer by deuxieme · Sep 19, 2015 at 03:30 AM

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!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by LymanCao · Jul 08, 2016 at 02:20 PM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by yuriki · Jul 11, 2018 at 09:05 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!

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hecthoralvaro · May 04, 2021 at 11:00 PM 0
Share

Hi yuriki, I would like some help, I think I have the same problema as you. Can you help me

avatar image podjigateligrey · Oct 10, 2021 at 10:42 AM 0
Share
  • I don't now how to explain but Its some how related with "Animation" component added to the script

  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

59 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why does my sprite changes position after animation transition? 1 Answer

Fast Sprites Extraction from Sprite Sheet 0 Answers

Having trouble changing sprites in 2 dimensional animation 1 Answer

Animated Overlay Armor Sprite 1 Answer

Sprite disappears on android 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges