• 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
Question by Jonesy19 · Jul 14, 2017 at 07:43 PM · animationspriteanimatorlegacylegacyanimation

Legacy Animation doesn't work...

Hi Everyone, I'm trying to create a legacy animation and get it to play, but it doesn't seem to want to. I have an animator running and it works great, but it's extremely inefficient, and since I have hundreds of gameobjects at a time with animators, I decided to go the animation route. Ok, now I have set up an animation and attached it to a gameobject. I've attached clips to it, but it will not play. Even when I try to play it in the editor manually (by selecting the gameobject and pressing "Play" in the animation window, I still see nothing...Any ideas? By the way, this is for a 2d game by the way, so it's sprites...

NOTE: I have already changed the animation to be Legacy (options->Debug) in the editor.

Thanks,

Comment
FlyingFeesh

People who like this

1 Show 0
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

3 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Bunny83 · Jul 14, 2017 at 07:52 PM

Sprite animations only work with the new animation system, unfortunately. Legacy animations clips can only animate properties of components. If you don't want to use the Animator you may want to do the sprite animation manually by exchanging the sprites in the spriterenderer.

edit
If you have trouble how to do this manually, have a look at this answer

Comment
Jonesy19
Nathan4567
Kaldrin
FlyingFeesh
AlanPereiraArt

People who like this

5 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 Jonesy19 · Jul 14, 2017 at 08:01 PM 0
Share

Ahh man, really? That's really too bad because the animators are soooooo cpu-intensive. When I turn them off, my game literally goes from 30 fps to 60fps... Ok, thanks for the info, I will have to figure this out...

avatar image Kaldrin · Mar 10, 2021 at 07:52 PM 0
Share

Thank you! It was very surprising for me since I animated a lot of things with the legacy animation component, it's more optimized to use that for UI elements than an animator, but I guess for this one I'll have to use an animator ^^;

avatar image

Answer by hyagogow · Nov 08, 2022 at 08:06 PM

I've created this package which "overcomes" this limitation. It's totally free.

alt text


coin-legacy-animation.gif (312.1 kB)
Comment
AlanPereiraArt

People who like this

1 Show 0 · 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

Answer by lquinonescgi · Aug 02, 2022 at 03:55 PM

Hi,

Legacy doesn't support any PPtr Animation, you can animate any property of the Components, but you can not animate the reference to another object like the Sprite reference.

You could try using the 2D Animation package.

https://docs.unity3d.com/Packages/com.unity.2d.animation@6.0/manual/ex-sprite-swap.html https://docs.unity3d.com/Packages/com.unity.2d.animation@6.0/manual/Examples.html https://www.gamedeveloper.com/programming/using-unity-s-new-2d-animation-package-for-traditional-sprite-animation

Comment

People who like this

0 Show 0 · 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

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

187 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Animation based on replacing sprites in sprite renderer does not work? 0 Answers

Why I can't play animations in my 2D game? 0 Answers

Cant play animation in animator 1 Answer

How can a 2D Sprite remain on the same space when the sprite is stretched? 2 Answers

Animation with Transparency Floats Above Ground 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