Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 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
0
Question by unityplease · Apr 23, 2015 at 11:11 AM · mecanimtransitionidle

Copy/Paste Mecanim Transitions

I created a complex state machine that has several transitions from an idle state:

Idle -> walk
Idle -> jump
Idle -> sit
Idle -> crouch
Idle -> lie down
(many more)

I have since realized that I want to have several Idle states and randomly get chosen to give variation to my character instances.

Because otherwise the character instances that start at the same time look choreographed performing the same idles at the same time.

There are two ways I can see to achieve this. One is have each idle state inside a sub state machine and a random int chooses which one to play. The other is to have two separate blend trees with the series of idles inside and have each on set by a float and transitions to the other blend tree idle, and then chooses another float before transitioning back.

Either way I have to copy all the numerous 10+ transitions from my old single idle state to either both my blend trees as exits or to each of the idles.

However there appears to be no quick way to copy/paste animation transitions.

Am I expected to manually rebind all these transitions or can the current idle state be copied with all its currently attached transitions and then substitute in other animations/ or sub state machine/blend tree in that states place?

The multiple randomly chosen idle state question has been asked many times before but doesn't appear to have a clear answer which is strange for what I would assume is a common problem.

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

6 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Alacer · Jan 14, 2018 at 08:54 PM

3 years later, i know. But this came up as one of the first when google it.

I found out that it is possible to copy a transition with the conditions. Click your transition, in the inspector right click your transition you can find at the top under Transitions, there you can select copy. Then you just make a new transition and right click to paste.

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 tobemayr · Jul 10, 2018 at 02:29 PM 0
Share

THIS! everything else is blah.

avatar image boorch · Nov 02, 2019 at 05:23 PM 1
Share

i've just logged in to say that THIS worked briefly for a specific version of Unity 2018. The right click contextual menu has only "Reset" since 2019.

This is extremely inconvenient.

avatar image
2

Answer by muzboz · Oct 07, 2020 at 09:10 PM

As @Alacer already said above... (but I wanted to provide a screenshot as well for clarity):


  1. Click your Transition line in Mecanim to select it.

  2. In the inspector, right click on your transition in the Transitions list at the top under Transitions (see image below).

  3. There you can select Copy Transition Parameters.

  4. Now you can select another Transition line in Mecanim.

  5. And in the inspector, right click your transition in the Transitions list.

  6. Now you can select to Paste the Settings, or the Conditions, or Both.


Unity Transitions Copy Paste

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 EJSainz · Apr 05, 2021 at 09:03 PM 1
Share

Confirmed. Accounting for clarity, this should be the best answer. Please upvote.

avatar image Jaakk0S · Aug 03, 2021 at 11:03 AM 1
Share

Thank you for this. Copy-pasting the Mecanim substate machines loses all state and transition data, but copying the transition values is very helpful. And it is very well hidden where to copy any parameter values as you need to right-click on the transition as showed in the pic.

avatar image
1

Answer by mambo_2 · Jun 10, 2015 at 03:35 PM

http://forum.unity3d.com/threads/script-to-copy-statemachines-whole-controllers.332008/

Try using this script I created for this purpose!

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 Max_Bol · Jul 28, 2016 at 10:24 PM

I'll be franc with you, which might sound harsh... But method of creating a multi-layered state layout with, for example, 5+ states coming out of Idle, run, walk, etc. is actually obsolete and actually useless since Unity 4's mecanim upgrade.

The best way (both in time and with the system) is to uses the "Entry" and "Exit" nodes correctly. The best way of describing the Entry & Exit node is that they are linked together in a seamless way that automatically adapt when set correctly.

For example, by setting an Integer (int) parameter called "GeneralState" as this : 0 = Idle (can be a state of a Blend tree)

1 = walk

2 = Run (could be a blend tree with walk if both animation blend correctly)

3 = jump

4 = sit

5 = crouch

6 = lie down

• You like all those states with Entry (green) and Exit (Red nodes).

• You put Idle as default (orange). This means that whenever "GeneralState" is 0, the character is in Idle.

• You add the condition "GeneralState" "if equal" 1-6 (based on which action) with the transition between entry and the states.

• You add the condition "GeneralState" "If not equal" 1-6 (same as previous point) with the transitions from each nodes toward exit (red) node.

Now, whenever you change (with whatever method or parameter) it so that the GeneralState change, the animation move through the exit node and automatically re-enter through the Entry node with the same parameter as when it went through the exit node. The only "touchy" thing is triggers. A good way of managing triggers is to use actual State-Machine with trigger transitions. (Remember, you can copy the whole State-Machine with a right click and then pass the whole this as a sub-state-machine a bit similar to how Blend-trees works, but with actual sub-graphics states.)

With this method, you only have to put the transition from the entry and exit point once.

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 aegis123321 · Dec 26, 2020 at 03:00 PM

I met this problem but didn't find a good solution, so I made a tool to copy/paste transitions.

https://github.com/qwe321qwe321qwe321/Unity-AnimatorTransitionCopier


I hope it helps anyone who's been suffering from changing state in complex animator.

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.

Follow this Question

Answers Answers and Comments

29 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

Related Questions

mecanim move and root animation 0 Answers

Random float parameter for idle animations 1 Answer

Triggering an animation once in mecanim 4 Answers

Mecanim won't save instant transition 1 Answer

Mecanim, Interrupting Transitions 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