gd-YAFSM
gd-YAFSM copied to clipboard
(feature request) any state
I often find myself needing to have a state that can be reached by all other states with a single condition. Making transition arrows from each state creates a big mess and everything looks quite confusing. When using unity's state machine I have noticed they have a "any state" state. Implementing soemthing like this should make state machines cleaner.
Can you point me to the documentation of unity's "any state" state?
Thats the best I can find:
**Any State** Any State is a special state which is always present. It exists for the situation where you want to go to a specific state regardless of which state you are currently in. This is a shorthand way of adding the same outward transition to all states in your machine. Note that the special meaning of Any State implies that it cannot be the end point of a transition (ie, jumping to “any state” cannot be used as a way to pick a random state to enter next).
https://docs.unity3d.com/Manual/class-State.html
Cool, I do have some experience with unity's state machine but I never knew the existence of "any state". And I think the implementation should be as easy as adding a special state - named "Any State"(literally, just like "Entry" or "Exit")
Exactly! It is not a big feature but helps you keep the spaghetti away.