Dynamic Pins
Last updated
Last updated
Open Logic allows you to dynamically add pins to a node during runtime, making your nodes even more dynamic and versatile.
The NodeBase class API provides extensive Blueprint exposure, including access to the Add Input Pin
and Add Output Pin
functions.
These functions allow you to dynamically add input and output pins to your custom nodes. Be sure to check the Is Dynamically Added
parameter when adding new pins.
You can also remove an execution pin by simply calling the Try Remove Pin
function on an instance of ExecutionPinBase.
A Sequence node is a type of node commonly used in graphs to execute multiple tasks in a specific order.
Start by creating the Task Node. This task has one input pin and no output pins, as the pins will be manually added by the user in the graph editor.
The task runtime blueprint is simple: get the number of output pins, use a for loop to execute each pin, and complete the task when done.
Add a new output pin when the Add Pin (+) button is clicked.
Assign the displayable widget class in the task node class data.
Next, let's design and create the that will serve as the interface for adding new pins to the task.