Quick Start
Here is an example of using Flow to output a "Hello World" message.
Ceate a new C# script
MyFlowObject.cs
and make it inherit fromFlowGraphObject
.Add a
Start
method to the newly created class so that Unity can call this method when the game starts.Add
ImplementableEventAttribute
toStart
method so that we can implement its logic in Flow Graph.
using Ceres.Graph.Flow;
using Ceres.Graph.Flow.Annotations;
public class MyFlowObject: FlowGraphObject
{
[ImplementableEvent]
private void Start()
{
}
}
Now create a new GameObject in the scene and attach
MyFlowObject
component to it.Click
Open Flow Graph
in the Inspector panel to open the Flow Graph Editor.Right click graph and click
Create Node/Select Events/Implement Start
.Then click
Create Node
and searchLog String
, connect the white port (exec) to theStart
node's output (exec).Fill in "Hello World!" in the
In String
field of theLog String
node.Click save button in the left upper corner.
Play the game and you will see "Hello World!" in the console.