Animator: Retarget (change source/target state of) transitions

Is there some way in the Animator window to change the source or target (state) of a transition (thereby keeping all its other settings)? Thanks!

1 Like

It’s not in the Editor right now; this is one of those things where we know how to do a quick hack, but we haven’t taken the time to implement it correctly.

You can use the script I’ve attached, it adds a right click menu to your inspector, and lets you copy paste transition values.
3009078--224460--upload_2017-3-27_14-5-59.png

Note: this won’t work for transitions from a StateMachine, or Entry transitions. It should not be too hard to fix it, it’s just that they don’t share all the same members.

Also, this needs to be in a folder named Editor in your project

3009078–224459–CopyTransition.cs (1.54 KB)

4 Likes

I was testing it a bit, and the script won’t work well for multiple transitions; it will always take the first one.
I’ll leave it here for now, until I find something better

2 Likes

@DavidGeoffroy cool, thanks for your answer & script, very helpful!

Is this in the editor by now? Just asking, it’s been 4 years since the question came up here…

Yes! Right click where he says to above (it looks like new state → new state 0) and the option will appear without the supplied script.

1 Like

Great, thanks :slight_smile:

looks like there is a menu to copy, but no to retarget