Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AddVariableNode(IVariable, Vector2)

Creates and adds a new variable node referencing an existing variable.
Read time 1 minuteLast updated 6 days ago

Definition

public IVariableNode AddVariableNode(IVariable variable, Vector2 position)

Parameters

variable

The variable to reference. Must belong to this graph.

position

The position of the node.

Returns

Type

Description

IVariableNodeThe newly created variable node.

Remarks

Enclose this method with Graph.UndoBeginRecordGraph and Graph.UndoEndRecordGraph to add this operation to the undo stack and to update the graph view with the changes.