Using Mecanim animation state machine, how can a state transition to itself?

There doesn’t appear to be a built in way to have a state transition to itself. A trivial example of when this would be desired is in a melee combat system, where PunchLeft can be done twice in a row.

Simply loop the punch while the key is pressed. If you have a leave condition, just leave the state to a different one.

So playing a bit with it, the trick is to make sure all transitions conditions are false and the animation is looped.

I wonder why it cannot transit to itself. Unity has this problem from the legacy animation system, and they solved it with functions like PlayQueued/CrossFadeQueued, which was really not intuitive.

Have two identical states transit to each other on the same transit condition.