Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 1.17 KB

File metadata and controls

18 lines (12 loc) · 1.17 KB

Unity Hierarchical StateMachine

HSM

A flexible Hierarchical State Machine (HSM) system for Unity with support for transition sequencing and asynchronous activities. This framework is designed for game developers who want fine-grained control over state transitions, composable activities, and the ability to structure complex logic in a maintainable way.

Features

  • Hierarchical States: Organize states into parent/child relationships with automatic entry and exit logic.
  • Transition Sequencer: Orchestrates deactivation and activation phases when switching states.
  • Activities: Attach asynchronous tasks to states, such as delays, animations, or effects, that run during entry or exit.
  • Sequential & Parallel Execution: Run activities one-by-one or all at once depending on the transition.
  • Composable API: Easily extend with your own custom activities, transitions, and orchestration logic.

YouTube

HSM Implementation Video

Check out my YouTube channel for more Unity deep-dives.