Developer tool
Behavior Graph
A custom Behavior Tree tool for Unity: a graph editor and runtime for configuring enemy behaviour.
Overview
Behavior Graph is a custom Unity tool for authoring and configuring behaviour trees. It combines a Unity Editor graph editor with a runtime tree so that enemy behaviour can be assembled from visual nodes and stored with game assets.
What it includes
- A
ScriptableObjectgraph asset storing nodes, connections, the root node, and canvas positions. - A
GraphVieweditor with node search, connecting and disconnecting, positioning, and root-node assignment. - Composite
Selector,Sequence, andParallelnodes;Invert,Force Success, andTimeoutdecorators. - Actions for waiting, condition checks, movement strategies, target attacks, and area damage.
- A runtime node lifecycle with entry, execution, completion, forced stop, and
Success,Failure, andRunningstates.
Behaviour debugging
During Play Mode the editor can attach to a selected object using the open graph and highlight its runtime node states. This makes it easier to see the active branch and investigate enemy behaviour.
Technical foundation
Serializable node descriptions are separated from runtime nodes and converted into executable objects through factories. Connection capacity is validated, and child order in composites is derived from graph position, enabling visual authoring while keeping the graph as a Unity asset.