Search Unity

Is there a way to change multiple Animator Controller transitions at once?

Discussion in 'Animation' started by godsammit, Nov 10, 2018.

  1. godsammit

    godsammit

    Joined:
    Nov 10, 2018
    Posts:
    1
    I have an animator controller with over 50 animation transitions. I want all of the transitions to occur at the same speed. Naturally, I tried to select them all, and then change the slider, but it only actually affected one transition. Am I missing something or is this just something Unity isn't capable of doing?
     
  2. leftshoe18

    leftshoe18

    Joined:
    Jul 29, 2017
    Posts:
    34
    There are certain elements of the animation system that aren't compatible with multi-editing. This just might be one of those things.
     
  3. SilentSin

    SilentSin

    Joined:
    Jan 3, 2013
    Posts:
    218
    Things like this are a big part of why I made Animancer to replace animator controllers. Everything is much more flexible when done with code.

    That said, this particular issue has a simple solution. Delete all your transitions and the parameters controlling them and use CrossFade or CrossFadeInFixedTime to transition to the state you want, which lets you specify how long you want it to take in code.

    Another option would be to write an editor script that casts the RuntimeAnimatorController to an editor AnimatorController which lets you access its states and transitions, so you can set their time in that script.