Life and Style Media - CSharpington

A simple to use, simple to program monobehavior based state machine. Allows for predefined machines using Scriptable Objects. Easy to define transitions that are changeable in the inspector. Editor only reflection.


Current Version: 1.1.1
Price: FREE
License: MIT
Type: Monobehavior


Inspector State Machine was created as a completely simple, but versatile solution that requires no extra windows or modals to use. Stupid simple. You can have a scene based state machine (MonoBehavior) or you can have a predefined state machine (ScriptableObject) that can be added to a Inspector State Machine. Here is what the GUI looks like.

A green state is your start state. A blue state is an active state.

Now for some API. All you need to do is inherit from Lasm.InspectorSM.State.

All states have a constructor of YourState(IStateMachine owner). This will set it so we have access to the MonoBehavior we are on, decoupled.

You can override Enter, Update, and Exit. For us to have transitions, we must override DefineTransitions. Within this method, to define transitions we use the method AddTransition(new Transition("MyTransition"). That is it! Now you have access to all state automatically in your project.

There is more API for ChangeState, ForChangeState, ect, that will be added real soon.