In this chapter, we will walk through a simple example—a Cube that rotates and changes color—to quickly demonstrate the core components of Flow Core: the Blackboard and the Flow Graph.

Scene Setup

First, create a Cube in the scene, then reset its Position to (0, 0, 0).

Add the Flow Core Process component to the Cube. A Game Object GUID component will be added automatically. This GUID is the unique identifier for the instance and is managed by Flow Core, so you can keep the default settings

Then add a Blackboard component. In the Blackboard panel, click [Add to Local] to register it in the Local Blackboard list of the Flow Core Process. Finally, verify that the Blackboard appears correctly in the Local Blackboard list.

image.png

In the Project window, create two Materials, Red and Blue, and enable Addressables for both.

image.png

In the Blackboard panel, click [Edit] to open edit mode.

Add a Single bucket and add a Key named Rot Speed with a default value of 15. If needed, click the yellow star ⭐ next to the Key to add it to the whitelist, so it can be selected more conveniently later and to reduce errors caused by typos.

Create a Material bucket and add two Keys, Red and Blue. Assign the corresponding Material asset to each Key, and verify that the Address field is not empty.

You can also turn on Comment and add a note for each Key, which can help with organization and future reference.

image.png

Create Flow Graphs

In the Project window, create a new Flow Graph by selecting Create → Two Cats Code → Flow Core → Flow Graph, and name it Cube. Double-click Cube Graph to enter the Flow Graph Editor.

First, create a Trigger node, which serves as the starting point for all events. Right-click to open the creation menu, then select Trigger. In the Trigger settings, set the Unity Event to Update. If you like, you can also rename the node to make the graph easier to read. Here, we will rename it to Update.

With the starting point in place, the next step is to create an execution node—the Action node. Right-click in the graph, create an Action node, and rename it if needed to make the graph easier to read.

Connect the Trigger node’s Out Port to the Action node’s In Port. This creates a basic Flow execution chain with a clear starting point and one execution node. You can then extend the chain further by connecting the Action node’s Out Port to more execution nodes, enabling additional branches of logic.