Skip to main content
Flow Core Documentation
Menu

Build a Working Result

Build Your First Flow

Make a Cube grow when Play Mode starts by combining a graph, process, Blackboard, Trigger, and Action.

Audience
New to Flow Core
Time
10–15 minutes
Requires
A writable Unity scene
Modules
Flow Core
On this page

Create a Cube that changes from scale (1, 1, 1) to (2, 2, 2) when Play Mode starts. This result exercises the complete Flow Core loop without requiring C#.

What you will build

flowchart LR T["Unity Start Trigger"] --> A["Action"] B["Local Blackboard: TargetScale"] --> A A --> R["Cube local scale changes"]

Growing Cube changes from scale one to scale two when Play Mode starts.

Before (left): scale (1, 1, 1). After (right): scale (2, 2, 2) in Play Mode.

Watch the complete first-graph authoring loop, then use the written steps below as the exact configuration for this tutorial.

Video · 1:13Create Your First GraphSee the complete first-graph authoring loop before following the written steps.

Open video in a new tab

Create the scene owner

  1. Create a Cube and name it Growing Cube.
  2. Keep its Transform scale at (1, 1, 1).
  3. Add a FlowCoreProcess component.
  4. Add a Blackboard component to the same GameObject.

Keeping the process, Blackboard, and visible object together makes the first runtime ownership path easy to inspect.

Growing Cube has Transform, FlowCoreProcess, and Blackboard components.

The visible object also owns its process and typed data.

Create and assign the graph

  1. In the Project window, use Create > Flow Core > Flow Graph.
  2. Name the asset GrowCubeFlow.
  3. Return to Growing Cube and assign GrowCubeFlow to its FlowCoreProcess.

The graph stores authored nodes and connections. Assigning it to the process creates the scene relationship that will build a runtime instance.

Add the typed value

  1. Open the Blackboard component’s Edit view.
  2. Add a Vector3 key named TargetScale.
  3. Set its value to (2, 2, 2).
  4. In FlowCoreProcess, choose Open Full Configuration, open Blackboards, and add this Blackboard to Local Blackboards at index 0.

TargetScale is a Vector3 set to two and bound at Local Blackboard index zero.

The process reads the configured Vector3 from Local Blackboard zero.

Add the Start Trigger

  1. Open GrowCubeFlow in the Flow Graph Editor.
  2. Set Debug Context to Growing Cube.
  3. Right-click the canvas and add a Trigger node.
  4. Set Bus to Unity.
  5. Set Unity Event to Start.

Unity will publish this lifecycle event after the process builds its runtime in Play Mode.

Add the scaling Action

  1. Add an Action node.
  2. Connect Trigger.Out to Action.In.
  3. Select the Action and confirm the Flow Inspector shows that Action. Expand its Instructions section and use Add Instruction to choose Set LocalScale from Transform/GameObject.
  4. Expand the new Instruction. Under Instance, set Source to Payload and Payload Mode to Self. Keep the instruction’s component Scope set to Self.
  5. Under Value, set Source to Flow Core Process.
  6. In its Blackboard settings, select Scope: Local, Index: 0, and Key: TargetScale.

A Unity Start Trigger connects to an Action containing Set LocalScale.

The execution connection starts the scaling Action when Play Mode begins.

Set LocalScale uses Payload with Self mode for Instance and Flow Core Process for the TargetScale value.

Instance uses Source Payload and Payload Mode Self. Value uses Flow Core Process, Scope Local, Index 0, and Key TargetScale.

Single Focus opens the entry you are editing while retaining the sections needed to reach it. If the pane is pinned to another node, unlock it before configuring this Action. Use the entry’s Information command for field explanations, or More > Open Editor for a dedicated Instruction window. Both edit the same Instruction; opening a window does not add another operation.

Verify the result

  1. Save the scene and graph.
  2. Select Growing Cube and confirm its scale is (1, 1, 1) before Play Mode.
  3. Enter Play Mode.
  4. Confirm its Transform scale becomes (2, 2, 2).
  5. Exit Play Mode and confirm the authored Transform returns to (1, 1, 1).

Common Mistakes

SymptomCheck
The Cube does not changeConfirm GrowCubeFlow is assigned to FlowCoreProcess and the component is enabled.
The Trigger does not runConfirm the bus is Unity and the selected event is Start.
The Action does not runConfirm Trigger.Out is connected to Action.In.
Scale becomes the wrong valueConfirm TargetScale is a Vector3 at Local index 0.
The target cannot resolveSet Instance Source to Payload and Payload Mode to Self; keep component Scope on Self.
Editor summaries are unresolvedSet Debug Context to Growing Cube.

What You Built

You authored behavior in a Flow Graph, gave that graph a scene runtime through FlowCoreProcess, stored configuration in a typed Blackboard, started a chain from a Unity Trigger, and used an Action to change a Unity component.

Change TargetScale to (1, 3, 1) and run the scene again. The visible result should change without editing graph topology.