Publisher
umbr4x
uState
uState is a barebones Finite State Machine (FSM) plugin that introduces two lightweight, powerful nodes for managing stateful logic in your projects. Ideal for those looking for a minimal and flexible approach to FSM implementation, uState provides the fundamental tools needed to build and manage behavioral states through visual node-based logic.
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
๐ง uState
uState is a barebones Finite State Machine (FSM) plugin that introduces two lightweight, powerful nodes for managing stateful logic in your projects.
Ideal for those looking for a minimal and flexible approach to FSM implementation, uState provides the fundamental tools needed to build and manage behavioral states through visual node-based logic.
โ๏ธ Nodes Overview
๐งฉ uState
The uState node represents a single, reusable state template. It's the foundational block used by the uMachine node to define specific behaviors.
- Encapsulates logic that executes when the state is active.
- Can be customized to represent unique behaviors or actions in your state machine.
๐ง uMachine
The uMachine node is the state machine controller. It handles the transition between different uState nodes based on your logic.
โ ๏ธ Important: A
uMachinemust include at least oneuStatenode to function properly.
- Manages state transitions.
- Coordinates which
uStateis currently active. - Can evaluate conditions or triggers to switch states.
๐ Getting Started
- Install the plugin into your project.
- Install the plugin from the Asset Library or by downloading the
.zipfrom the repository. - Add a
uMachinenode anduStatenodes as children. - Create scripts that extend
uStateand drag them onto youruStatenodes. (I recomend making a different base_state.gd for different enities. Example included in the plugin) - To transition to a new
uState, in your script (eg. IdleState.gd) use the built in methodtransition_to(new_state: StringName). (Note that the value passed will automatically be converted to all lowecase.)
๐ Features
- ๐งผ Minimal, clean FSM design
- ๐งฑ Modular
uStatetemplates for reusability - ๐ Controlled state transitions via
uMachine - ๐ ๏ธ Easy integration with node-based environments
๐ License
This project is open-source and available under the MIT License.
๐ Contributions
Feel free to fork, submit pull requests, or suggest features and improvements!
Happy statemachining! ๐