The Statemachine Generator is a Unity tool designed to simplify and streamline the creation of state machines in your project. This tool eliminates the redundancy of manually copying and re-writing code for different states, allowing you to focus more on gameplay logic rather than boilerplate code.
- Open the tool from Tools > IcarusTools > State machine Generator.
- Use the Base Scripts panel to create your foundational state machine scripts.
- Switch to the Player Scripts panel to create and manage player-specific states and transitions.
- Use the Enemy Base Scripts panel for creating enemy base logic.
- Finally, use the Enemy States panel to create new enemies and define their behaviors.
Each panel is designed to minimize redundancy and generate clean, organized code for you.
The generated code follows a well-organized structure, keeping your state machine classes modular and manageable. You can review the class hierarchy and relationships in the diagram below.
Note: The full diagram file is available in Assets/Diagrams
if the image is not fully visible.
- Download the package from Link to Download.
- Import the package into your Unity project.
- Open the State Machine Generator from the Tools menu.