[Mecanim]How to transform a part of your current state machine in a sub state machine?

I start looking at mecanim and I have designed a pretty simple state machine like Idle → Walk_Start → Walk → Walk End → Idle.

The next step would be to add some more states like several attack related one or fly/jump, etc. But before that, I want to “regroup” my walk related states in a sub machine to avoid the “Big fat machine with states spread all over the sheet and I cannot understand it anymore” syndrome.

Is it any way to do that without redoing all the states/transitions in a new sub machine state?
I have found no way to copy/paste or directly regroup a bunch of state and transition…

Thanks in advance for any advice!



There is one way to do this: you need to copy entire Layer by choosing “Copy current statemachine” and paste in onto another layer. Doing so, new layer will have one substate machine with all states inside. However, be aware that due to mecanim bug, if you want to do this and already have other substate machine on your layer it will be damaged inside.