文档

Unity Engine

Unity Engine

AddVariableNode(IVariable, Vector2)

Creates and adds a new variable node referencing an existing variable.
阅读时间1 分钟最后更新于 1 个月前

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.