State Machines for Visual Script


Features ... - Unity 6000.6 or newer - Visual Script 1.0.2 or newer by Catsoft Works Supported OS ... What each state does, and when it changes to another, is made with the Triggers, ...


by BossyFi


Price History +

A state machine graph editor for Visual Script. States and transitions are made with the Triggers, Conditions and Instructions you already use, and the graph shows the current state while you play.

Features

- State Machine component and a graph window built with UI Toolkit

- States with On Enter, On Exit and Events that are only active in that state

- Transitions with Triggers and Conditions, several between the same two states, and Any State

- Pan, zoom, frame, multi-selection, search, duplicate, automatic layout and keyboard shortcuts

- Play mode debugging: current state, time in state, origin and history of changes

- Issues shown on the graph, with one-click fixes where there is a safe one

- Nodes: Change State, Is in State, On State Enter, On State Exit, State Name, Time in State

- References to states survive renaming

- Leaving a state cancels what it was waiting for. Loops are stopped and reported once

- Tested with 400 states in one State Machine

- C# API: ChangeState, Current, events for every change, building State Machines from code

- Full Undo support, light and dark Editor themes

- 2 sample scenes, one of them checks 18 edge cases by itself

- 33 automated tests included

- Full C# source code


Requirements

- Unity 6000.6 or newer

- Visual Script 1.0.2 or newer by Catsoft Works


Supported OS

No platform-specific code. Developed and tested in the Unity Editor on macOS.


Documentation

Documentation.pdf is included in the package.

State Machines adds a State Machine component and a graph editor to Visual Script.


A State Machine runs one state at a time. What each state does, and when it changes to another, is made with the Triggers, Conditions and Instructions of Visual Script. The graph shows the structure, and the logic stays the one you already know: there is no second scripting language to learn.


Create states with a double-click, drag to connect them, and edit everything in the side panel without leaving the graph. Each state has On Enter and On Exit instructions and its own Events that only react while it is the current state. A transition has Triggers that say when to check it and Conditions that say if it passes. Any State leads to a state from everywhere.


While the game plays, the graph highlights the current state with the time spent in it, the state it came from and a history of the latest changes.


The graph marks what looks wrong on the state or the arrow itself: a transition to a state that no longer exists, a state nothing leads to, two states with the same name.


It suits characters, enemies, doors, game flow, UI screens and anything else with distinct modes, in any genre.


Requires Visual Script by Catsoft Works (free).