Skip to main content

Variable

Use this node to store a single data variable that will be globally accessible throughout the application. Variable works in a similar way as Object but can only store one value.

The value can be dynamically stored, either by passing it a new value or by sending signals to the Set Variable node.

Storing a value

Give the Variable a name with the Name input and simply connect to Value, whenever the input connection is updated the value will be stored in the variable. You can also use the Set Variable node to update tha value of a Variable. In this case, you control when the value is stored by sending a signal to the Do action.

Use a stored value

When a value is stored in a variable you can use it somewhere else in your application simply be creating a new node and giving it the same Name and connecting the Value property.

Inputs

DataDescription
NameThe name of the Variable. All Variable nodes with the same name will share the same data.
ValueThe value that you want the Variable to get. You will connect your data to this input. The value of the Variable will change when the data changes. If you want to control more precisely when the value should be updated, you should use the Set Variable node.
SignalDescription
FetchNormally the value output of the node is updated once the Name input is set and if there is a change in the data from somewhere in the graph. However, if this signal has a connection it will wait until it gets a signal on Fetch before it updates.

Outputs

DataDescription
ValueThe current value of this Variable node.
NameThe name of the Variable.
SignalDescription
ChangedThis signal is sent when the Value of this Variable has changed. Note: The signal triggers when any Variable with the same Name is changed, i.e. it triggers when the underlying data has changed.
FetchedSignal when the data of this Variable node has been fetched and updated, either as a response to the Fetch input signal (when it has completed and the output Value is updated), or when the Name of the variable have changed.