Overriding animation transitions

Is there any way to override animation transitions in Unity? I want to be able to use a single animation controller with multiple different avatars, each with its own set of animations. The Animator Override Controller is great for replacing animation clips but I need more control over the transitions duration and offset for the different animation sets. I don’t want to have to create a unique controller for each character since my controller is already very complex. Is there any solution for that?

The best solution is to avoid Animator Controllers and use a better system that doesn’t have so many silly restrictions.

A much less effective solution would be to avoid transitions in the Animator Controller and use animator.CrossFade(“State Name”, fadeDuration) or CrossFadeInFixedTime instead. You wouldn’t be able to easily preview/tweak things or use exit time transitions, but your scripts would have control over each transition.

But I need to use transitions for the animation to look good. I wish Unity had some sort of an animation controller inheritance method which would let us override every aspect of the controller (states, transitions, etc.).

CrossFade can give the exact same result as a transition, you just need to specify the timing in the script.

But then I won’t have exit time so I’ll have a hard time switching from state to state. For example, one character transitions from state “Jump” to “Fall” after a certain time but another character needs to start that transition a little bit later.

Yep, that’s why it’s not a good solution. You’d need to check the current animation time every frame to determine when to fade to the next animation. But that’s probably the best you can do if you keep using Animator Controllers.

Yes, that’s what I thought. Thanks anyway!