Reusable ActionFlow assets¶
ActionFlow 2 can store behavior in project assets instead of tying every flow to a scene object or prefab. These assets are reusable, accept typed parameters, and can be called from ordinary Game Creator instructions and conditions.
Instruction and Branch Assets keep their reusable hierarchy visible as a rooted graph, so the public entry point and every downstream path can be understood together.
Asset types¶
| Asset | Contains | Use it when |
|---|---|---|
| Instruction Asset | One asynchronous instruction flow | Several callers should run the same sequence |
| Branch Asset | An asynchronous branch with multiple paths | A reusable operation needs branching flow |
| Condition Asset | A synchronous condition list | Several callers should evaluate the same rule |
Create them from Create › Game Creator › ActionFlow 2 in the Project window.
Instruction Asset¶
An Instruction Asset stores one reusable asynchronous instruction flow. Its permanent root defines the typed parameters callers must supply, while the connected graph keeps the complete sequence visible in one document.
Branch Asset¶
A Branch Asset packages reusable branching behavior. Its permanent root owns the public parameters and branch entry, and its downstream graph shows where each decision path leads.
Condition Asset¶
A Condition Asset evaluates one reusable synchronous Boolean rule. Because its condition list has no downstream graph topology, it uses a focused Inspector instead of a graph canvas. It still supports typed parameters supplied by each caller.
Double-click an Instruction or Branch Asset to open its graph. You can also select one and choose Assets › Open in ActionFlow 2.
Rooted asset graphs¶
An Instruction or Branch Asset graph has one permanent root. The root owns the asset's parameter signature and is the entry point for its flow.
Nodes must remain reachable from this root. Add the first node from the root, then extend the graph from existing outputs. This keeps the visual graph and the serialized Game Creator lists in agreement.
The asset is a normal Unity ScriptableObject:
- its data is visible to version control;
- edits participate in Unity Undo and Redo;
- references use Unity's normal object-reference system;
- callers reference the asset rather than a copied graph.


Define parameters¶
Select the asset root to add, remove, rename, reorder, or change parameters. Each parameter has a stable internal identity, a display name, and a type.
ActionFlow 2 builds the available parameter types from compatible Game Creator property providers in Core and installed modules. Adding a module can therefore add its supported value types to the parameter catalog after Unity recompiles.
Changing a public parameter signature can affect every call site. Review callers after removing a parameter or changing its type.
Call an asset¶
ActionFlow 2 adds Game Creator entries for each native asset type:
- Run Instruction Asset runs an Instruction Asset;
- Run Branch Asset runs a Branch Asset;
- Check Condition Asset evaluates a Condition Asset;
- the Condition Asset boolean property exposes a Condition Asset as a Game Creator boolean value.
After selecting an asset, the call site displays an argument for every parameter. Arguments are normal Game Creator properties, so they can use constants, variables, and compatible property providers from installed modules.
Treat the root like a small public API
Give parameters descriptive names and keep the signature focused. An asset with a clear contract is easier to reuse and safer to change.
Invocation behavior¶
Each call receives its own working copy of the asset's runtime data. This keeps nested and concurrent asynchronous calls isolated from one another. Calls also retain the caller context used by Game Creator properties and participate in the caller's cancellation lifecycle.
If an asset reference, parameter, or argument type is invalid, execution fails safely and reports the problem instead of guessing at the intended value. Recursive calls are bounded to prevent an accidental asset cycle from running without limit.
Edit and test safely¶
Use Edit Mode for structural changes such as adding, deleting, or reconnecting nodes and changing an asset's parameter signature.
In Play Mode, the structure is locked. Ordinary serialized values on the asset can still be adjusted for testing and those asset edits persist like normal Unity asset changes. Keep the asset graph open to see direct and nested asset calls highlight while they execute.
Find and update callers¶
Before changing a widely used asset:
- make a version-control checkpoint;
- note the current parameter signature;
- change the asset in Edit Mode;
- inspect its Game Creator call sites for missing or incompatible arguments;
- run representative callers in Play Mode.
See Compatibility and modules for how module content becomes available to assets.