I just need to come and go between “Fall” and “GroundMotions” substatemachines, with ‘grounded’ bool condition. Whatever state is playing inside sub state machine, when condition is right I want to cancel it and transit between each other.
But, to do this, it seems like I have to add transitions for ALL states inside each substatemachine…
I know there’s “Any State” feature, but there’s no substatemachine specific “Any State” yet.
So, are there no options other than just use Animator.Play in onStateUpdate()?
So what do you think about an “any internal state” node, which works like the any-state node, but only as long as you’re inside of the substatemachine the node’s in?
Setups like @GarlicDipping 's, where you want to exit a machine no matter where you’re in it, are pretty common. an Any Internal State node would help a lot. It’d also reduce the number of transitions and make the state machines much more appealing and readable.
Yup, as @Baste says, ‘Any internal state’ node will be really helpful. I found there’s already feedback here, but seems like it’s not on the spotlight yet…
I agree, - even though it would mean having to check more outgoing transitions, to see what the user intended to do. Who cares, just do it guys!! it will be amazing
Just saw this thread when I was googling. Have so many situations like this in my game. Currently, I am calling Play/CrossFade on the animator in the player controller’s state machine (not the Mecanim one). It would be very neat to have some default state within a sub-state machine that you can transition to.
Is the Unity team aware of this? Would be really useful.
Right now the only way to do something similar is to add a transition out of the global Any State node, which doesn’t always fit with what one wants to do, or adding transitions from each sub state machine node to the Exit node.
I’m in the same situation. It feels ridiculous Unity has been aware of this since 2016, and you have still to do a one-by-one transition when working with sub-state machines.