Skip to content

Development

Inspiaaa edited this page Apr 1, 2025 · 1 revision

Developing Code for UnityHFSM

Project Structure

.
├── src/
│   ├── Base/
│   │   └── Base clases for the state and transition types, interfaces for base 
│   │        functionality
│   │
│   ├── StateMachine/
│   │   └── Main state machine code, shortcut methods
│   │
│   ├── States/
│   │   └── Main state classes
│   │
│   ├── Transitions/
│   │   └── Main transition classes
│   │
│   ├── Exceptions/
│   │   └── Custom UnityHFSM exception types and exception formatting code
│   │
│   ├── Inspection/
│   │   └── "External" code to traverse state hierarchies and to analyse 
│   │        hierarchical state machines. Used by the dynamic visualization tools.
│   │
│   ├── Util/
│   │   └── Util code (such as the timer class)
│   │
│   └── Visualization
│       └── Dynamic state machine visualisation tools such as the HfsmAnimatorGraph
│
└── Test/
    └── Unit tests

Running the tests

UnityHFSM has a test suite that can be run from Unity's Test Runner window.

  1. Open Window > General > Test Runner

  2. To run the tests, click the Run All button