Documentation

Learn how to use FlowCanvas

Download PDF Version

Creating Simplex Nodes

Creating Simplex Nodes is the most easy and direct way of creating custom nodes for FlowCanvas. To do so, you need to derive from one of the available Simplex node base types.

CallableActionNode

Callable Action Nodes, are meant to create actions requiring a flow signal to be called. They have 1 Flow input, 1 Flow output, up to 5 Value input parameters and no Value outputs at all. Simply put, you derive the generic CallableActionNode class where the generic arguments represent the value input parameters of your node and then you override the Invoke void method, which has a number of parameters equal and of same type as the generic arguments you declared. For example.

CallableFunctionNode

Callable Function Nodes, are similar to the Callable Action above, but they always return 1 Value output. The process is very similar to before, but in this case the first generic argument represents the type of the return value and the Invoke method that you will override will need to return that type declared. For example.

LatentActionNode

Latent Action Nodes are similar to CallableAction Nodes before, but in this case the Invoke method is a IEnumerator and is called as a coroutine. As such, you need to treat it as a coroutine. For example.

PureFunctionNode

Pure Function Nodes, are meant for nodes that do not need any flow signal to use, but instead they simply return a value when they are requested through the single Value output they have. The first generic argument is the return type of the node and the Invoke method you need to override, while the rest of the generic arguments are the value input parameters of the function to be used. For example.

 

Yes No Suggest edit
1 of 1 users found this section helpful
Suggest Edit