• 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
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
  • ‹
  • 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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

Having trouble changing sprites in 2 dimensional animation 1 Answer

Fast Sprites Extraction from Sprite Sheet 0 Answers

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

add animation frames to existing spritesheet with animations? 0 Answers

Simultaneous Animation for an Object 0 Answers


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