UI State Machine

This asset package contains very simple state machine system for controlling UI elements. The asset follows a paradigm where one can define explicit rules per UI game object, which will dictate when the game object should be visible & what transitions it should launch when state machine executes. This asset will not include any fancy state machine editorial systems or separate databases to control the states. Instead, it relies solely on class based approach. This means that every state, transition & transition animation is defined via specific class implementing a specific interface. These classes can then be hooked to game objects with specific UI State Machine System component.


This asset was purpose built for controlling UI states (ie. animations rely on RectTransform components), however, the actual state machine and it's logic does not depend on UI components. One can in theory leverage the state machine outside of canvas also.


How to use

Refer to the README.txt for documentation. In a nutshell, you define your custom states, state transitions & transition animations with custom classes. After that, you can hook them with desired UI game objects with UI State Hook & UI State Transition Hook components.