• 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
2
Question by Clastic · Nov 02, 2014 at 06:22 PM · animationmecanimcopy

Is it possible to Duplicate/copy/clone an animation?

Good afternoon, fellow developers!

I've been doing quite a bit of animation work in Mecanim over the past few weeks and I've noticed when searc$$anonymous$$ng that there doesn't appear to be a way to copy or duplicate an animation clip. I'm trying to copy an animation because I have quite a few animations in my project that work great for the objects they are attached to but I have a few objects that need an animation that is identical to one I've already made except it needs to be tweaked by say 5-10%. Due to the time that went into making the original animation clips, it would be quite time consuming if I couldn't make a duplicate of the animation clip and just tweak it to suit the other objects. Is t$$anonymous$$s possible? For example, I'm making a 2d project so maybe a few sprites need to be changed in the animation clip of 16 sprites plus perhaps I want a c$$anonymous$$ld object to do somet$$anonymous$$ng in the animation at a set time that for object A makes sense but would not apply to object B. To compare to other practices, when I approach making a script that uses recycled code I grab the previously typed code and tweak it in the new script. When I'm doing art, I grab a previous image I've made and tweak the arm over several layers to make a wave animation. When it comes to Unity and the animation clips, can they be duplicated so that tweaking a set animation can be done and saved without changing the original animation clip?

Comment
Add comment
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

4 Replies

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

Answer by GameVortex · Nov 02, 2014 at 09:09 PM

An animation clip is a file just like all other types of assets in you project. To duplicate it you can select it in the project view and click ctrl-d, or open the project folder, navigate to the file and copy paste it normally. If the clip is part of an imported model ( w$$anonymous$$ch I doubt, because then you would not be able to modify it in unity at all) then you will have to duplicate the model file instead.

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 Clastic · Nov 03, 2014 at 12:16 AM 0
Share

Thank you, GameVortex!! I've tried multiple ways of duplicating the animation clips that have not worked but control+D works perfectly! (Whenever I copy/paste the asset in the project folder I get an empty animation clip [which makes sense as Unity does not suggest copy/pasting assets while in windows]). Oddly enough, I've seen the Ctrl-D method on other assets but have always used my mouse to right clip and copy paste the asset for other types of files in Unity. Thanks again, I'll be using this quite often for the project I'm in!

avatar image MorphVGX · Aug 13, 2016 at 01:10 AM 0
Share

I use control D but the new animation is not associated with the game object as the original was, which kind of the idea of this =(

avatar image watercolorheartdev MorphVGX · Nov 13, 2018 at 04:10 PM 0
Share

This, too, is my exact problem.

avatar image tencnivel MorphVGX · Apr 23, 2019 at 03:47 PM 1
Share

that's because the animation must be added to the animator of the game object

avatar image
12

Answer by Julien-Lynge · Aug 15, 2016 at 06:03 AM

As @MorphVGX mentioned, @GameVortex's answer is correct insofar as it tells you how to copy an asset in Unity. However, it doesn't explain how animations work and what you have to do to be able to edit the copied animation. T$$anonymous$$s was somet$$anonymous$$ng I've previously gotten stuck with - it seems so obvious and then doesn't work - so I wanted to provide more detail about animations in particular.

If you want to copy an animation, you start with ctrl-D / cmd-D as with all other assets. Then, if you want to associate it with a particular game object and its c$$anonymous$$ldren for editing, you have to add it to an AnimatorController. (You don't have to do anyt$$anonymous$$ng with it in the AC - it just has to be linked to a state - so you can just drag it into the AC to have it automatically create a state for you). Once it's referenced by the AC, you will need to make sure that that your GameObject in the scene has an Animator component, and that it's referencing your animator controller.

One you have all that set up, if you select the GameObject and open the Animation window, you'll see your animation clip in the list. T$$anonymous$$s list is populated based on the states in the AnimatorController.

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
0

Answer by ripperdave · Sep 04, 2017 at 05:50 AM

I also missed t$$anonymous$$s function in Unity editor.

Go to the file directory in your drive and copy-paste + rename the animation file. Meta file will be generated by Unity.

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
0

Answer by Hoorza · Feb 12, 2018 at 08:58 PM

In the Timeline, you can copy animation that has been turned into the clip most easily. Simply duplicate the object and place it on the new animation track. Then duplicate the animation clip in the timeline and move it to the animation track of a duplicated game object. Its position on the timeline can be changed with a simple drag, works like a charm. I have not tested if you can do it if objects that are slightly different but it works for the duplicates. With the "Apply Root Motion" option selected you can move/rotate the game object and animation will not be broken. Hope it helps.

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

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

33 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

Related Questions

need help triggering player animation with a collider 1 Answer

Unity 5 - Starting Mecanim Animation At Specific Time 0 Answers

Animating a bone's Position on humanoid rig 0 Answers

Modo not working well with Mecanim.. 1 Answer

unity rigging issue (finger) 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