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"] -->|execution connection| A["Action: Set LocalScale"] B["Local Blackboard: TargetScale"] -.->|value read by the Instruction| 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.

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. Select Growing Cube. In the Graph section of FlowCoreProcess, set Storage Mode to Asset and drag GrowCubeFlow into Graph Asset.

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. In the Cube’s Blackboard component, choose Open Full Configuration. Select Variables, then Edit.
  2. Choose Add Entry and search for Vector3. Select that type, name the new key TargetScale, and set its X, Y, and Z values to 2.
  3. Return to the Cube’s FlowCoreProcess component and choose Open Full Configuration. Select Blackboards and add the Cube’s Blackboard to the first slot in Local Blackboards. The Instruction will read this slot as index 0.

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

The Blackboard holds the three scale values. The process’s first Local Blackboards slot points to the component that owns them.

Add the Start Trigger

  1. Choose Open Graph on the Cube’s FlowCoreProcess to open GrowCubeFlow.
  2. Set Debug Context to Growing Cube.
  3. Right-click empty canvas space, choose Create Node…, and add a Trigger.
  4. Select the Trigger on the canvas. In the Flow Inspector, set Bus to Unity and 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 on the canvas. In its empty instruction list, choose Add instruction and search for Set LocalScale. Select the entry in Transform/GameObject.
  4. Select the Set LocalScale row to see its Parameters in the Flow Inspector. Under Instance, keep the default Payload source and Self payload mode. Keep the component Scope set to Self. This selects the Cube’s own Transform.
  5. Open the binding control beside Value. Choose Flow Core Process as the source. Set the Blackboard scope to Local, leave the index at 0, and set the key to TargetScale. Choose Apply to return to the Instruction. Back takes you to the owning Action.

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

The screenshot uses the optional node titles Start and Grow Cube. Your Trigger and Action can keep their default titles. Follow the wire from the Trigger’s output to the Action’s input.

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

On the left, the selected Instruction shows which object to scale and where its value comes from. On the right, the Value editor shows the Local Blackboard at index 0 and the TargetScale key. Apply saves this binding.

If the Flow Inspector is pinned to another node, unlock it before selecting the Action. From the Action’s instruction list, More > Open Editor opens the same Instruction in a dedicated editor.

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.

Optional video from an earlier editor

This 73-second recording shows a different first graph. A Unity Update Trigger runs an Action that rotates a cube. The footage uses an earlier editor layout. Use the steps and screenshots above for the current controls and the Growing Cube exercise.

Video · 1:13Create Your First GraphAn earlier editor recording shows a Unity Update Trigger rotating a cube.

Open video in a new tab