Quick Start
Here is an example of using Flow to output a "Hello World" message.
Ceate a new C# script
MyFlowObject.csand make it inherit fromFlowGraphObject.Add a
Startmethod to the newly created class so that Unity can call this method when the game starts.Add
ImplementableEventAttributetoStartmethod 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
MyFlowObjectcomponent to it.Click
Open Flow Graphin the Inspector panel to open the Flow Graph Editor.
Right click graph and click
Create Node/Select Events/Implement Start.
Then click
Create Nodeand searchLog String, connect the white port (exec) to theStartnode's output (exec).Fill in "Hello World!" in the
In Stringfield of theLog Stringnode.
Click save button in the left upper corner.
Play the game and you will see "Hello World!" in the console.
Next Steps
- Learn about Flow Concept to understand Flow's architecture
- Explore Executable Events for different event types
- Check Executable Functions for exposing C# methods to Flow
- See Runtime Architecture for container types and usage patterns