2. Concept and workflow

You are here:
< All Topics
Table of Contents

FlowReactor is a high level visual scripting editor which simplifies the usual way of visual scripting. Each node represents an action or an event. One of FlowReactors most powerful feature is the ability to create unlimited nested sub-graphs (levels) with custom transitions (exits). It’s simplicity and versatility allows you to create UI menu flows, AI, dialog trees, in-game level scripting, game mechanics and logic flows.
FlowReactor follows the scriptable object workflow, each graph is stored in a separate asset file. FlowReactors global variable blackboard system allows you to manage your data within asset files and use them between different graphs. It also supports object based scene variable overrides which is very useful when dealing with scene based objects. Use the global event system to call events across graphs and manage them in eventboards.

Thanks to the node creation wizard, creating new nodes is as easy as creating a new c# file. Nodes can also be categorized in sub-categories which helps a lot if you need to create project specific nodes.

Each node in Flowreactor has only one input but can have several outputs. Variable connections are being handled within the node inspector. Blackboards can be used as a “bridge” to connect variables between nodes and even graphs.

In FlowReactor you can basically distinct between five types of nodes:

  • Event nodes

  • Action nodes

  • Coroutine nodes

  • Flow nodes

  • Sub-Graph nodes

Event nodes:

Event nodes are waiting to being called from an external source before calling the next connected node. That’s why event nodes do not have any inputs.

Further readings:

Action nodes:

Action nodes are executing commands/code. As soon as the action is finished it will call the next connected node.

Further readings:

Coroutine nodes:

Coroutine nodes are similar to action nodes the advantage here is that you can make use of yield functions like WaitForSeconds.
These nodes are great for more complex behaviors.

Further readings:

Flow nodes:

Flow nodes are controlling the flow of a graph such as wait, repeat, random switch or portal nodes.

Sub-Graph

In FlowReactor you can create unlimited nested sub-graphs with custom exits.
Sub-graphs are using OnEnterGraph nodes instead of OnStart nodes. – OnStart only works on the root graph. To create an exit you will need the ExitGraph node. You can create as many exits as you like.

Extract nodes

It is possible to extract a sub-graph. When selecting a sub-graph node you simply click on “preview” in the node inspector. This will allow you to see where the nodes in the sub-graph will be extracted, you can move them around and then click on “extract”.

Warning

Sub-graphs are using OnEnterGraph nodes instead of OnStart nodes.

Sub-Graph Instance

With the SubGraphInstance node you can create instances of existing sub-graphs. This is a great way if you want to re-use existing sub-graphs at different locations without the need of creating the same sub-graph again. So instead of copying the sub-graph you simply have to create an instance of it.

Due to the possible risk of endless loops, it’s only possible to select sub-graphs which are located at the same graph level.

Loop / Update

Some action nodes needs to be called repeatedly. (similar to code in a Monobehaviour update, late update or fixed update loop). To achieve the same behavior you can use the Repeat, LateRepeat and FixedRepeat nodes. Those repeat nodes can optionally be set to repeat itself only for a certain amount and/or to wait for a certain amount of frames. This is great if you want to relieve the CPU from less important computation loops. (no need to check for health value on every frame).

FRVariables

FlowReactor comes with its own variable types which are tightly integrated in the FlowReactor system. FRVariables can be used in Nodes, Blackboards and Eventboards.

It is important to know that graphs and nodes are scriptable objects. That’s why you can’t assign scene object references directly to node or blackboard fields.
If you want to use scene objects you can either expose a variable field directly to the scene which will make the variable available in the FlowReactorComponent or connect it to a blackboard variable and then override it in the FlowReactorComponent. 

Directly expose variables to scene:

Blackboard scene overrides:

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from Youtube
Vimeo
Consent to display content from Vimeo
Google Maps
Consent to display content from Google