Inspiaaa / UnityHFSM

A simple yet powerful class-based hierarchical finite state machine for Unity
MIT License
1.14k stars 125 forks source link

How to visualize multi-layer state machines #34

Closed chasinghope closed 6 months ago

chasinghope commented 1 year ago

How to visualize multi-layer state machines, such as Behavior Designer - 1.7.4

Inspiaaa commented 6 months ago

Hi @chasinghope, UnityHFSM is a primarily code-driven library and does not come with a visual editor / interface out of the box. If you are debugging a multi-layer state machine, you can use fsm.GetActiveHierarchyPath() to see which states are active. This method would, for example, return "/Move/Jump" for a state machine that has a nested state machine called Move whose active state is Jump.

If your occasionally interested in visualising state machines, I personally find myself using Mermaid to illustrate the state machines I've created or plan to create.