ActionGraphResource asset (.action file) and can be loaded, invoked, or embedded in a component at runtime.
Creating an action graph
Create the asset
In the editor’s Asset Browser, right-click and choose New Asset → Action Graph. The file is saved with the
.action extension.Open the graph editor
Double-click the asset to open the node canvas. The graph has a title, description, category, and icon — editable in the asset properties panel.
Add nodes
Right-click the canvas to open the node picker, then search by name or category. Connect output pins to input pins to build your logic.
ActionGraphResource
ActionGraphResource is the engine class that backs every .action file. It derives from GameResource and wraps an ActionGraph object, deferring deserialization until the graph is first accessed so that types are guaranteed to be loaded.
[AssetType] attribute registers it with the editor under the Action Graph category:
Invoking a graph from C#
TheActionsInvoker component bridges Action Graphs and the component lifecycle. Assign an Action delegate property (backed by a graph) and the invoker calls it at the appropriate moment:
ActionGraph and calling it directly:
Built-in node categories
Nodes are organised into categories in the picker. The table below lists the main built-in families.Scene nodes
Scene nodes
Defined in
SceneNodes (Sandbox.ActionGraphs). These nodes work with the scene graph and asset system.| Node ID | Title | Description |
|---|---|---|
scene.get | Get | Gets a component from a target object |
scene.get.inscene | Get in Scene | Finds the first active component of a type |
scene.getall.inscene | Get All in Scene | Finds all active components of a type |
scene.instantiate | Instantiate Prefab | Creates a prefab instance in the scene |
scene.clone | Clone Game Object | Makes a copy of a GameObject |
scene.find | Find Object by Name | Finds a GameObject by name |
scene.findall | Find Objects by Name | Finds all GameObjects by name |
scene.trace | Scene Trace | Returns the scene’s trace builder |
scene.netspawn | Network Spawn | Spawns a GameObject over the network |
sound.play | Play Sound | Plays a SoundEvent at a world position |
Collection nodes
Collection nodes
Defined in
CollectionNodes (Sandbox.ActionGraphs). These nodes create and manipulate generic collections.| Node ID | Title |
|---|---|
array.new | New Array of |
list.new | New List of |
set.new | New Set of |
dict.new | New Dictionary from to |
list.get | Get Item |
list.set | Set Item |
Utility / operator nodes
Utility / operator nodes
Defined in
UtilityNodes (Sandbox.ActionGraphs). These nodes handle type testing, conversion, and string formatting.| Node ID | Title |
|---|---|
op.as | As |
op.convert | Convert |
op.isnull | Is Null |
op.isnotnull | Is Not Null |
sys.tostring | To String |
sys.tostring.format | To String (Format) |
sys.gethashcode | Get Hash Code |
Scene event nodes
Scene event nodes
The
RunSceneEventNodeDefinition node (ID scene.run) lets a graph dispatch a scene event to all components that implement an ISceneEvent<T> interface. Select the interface type and method name in the node’s property panel. You can optionally pin a target GameObject to scope the event to that object’s descendants.Registering custom nodes
Decorate a static method with[ActionGraphNode( "your.node.id" )] to expose it as a node in the picker:
[Pure]marks the node as side-effect free (no execution signal pins).[Title]sets the display name in the picker.[Category]groups the node in the picker hierarchy.[Icon]sets a Material Icons glyph on the node header.
The node ID must be globally unique. Use a dotted namespace prefix (e.g.
myaddon.category.action) to avoid collisions.