public void Set(NodeGraphVariable variable, NodeGraphVariableAccessorType accessorType) { AccessorType = accessorType; if (variable == null) { NodeEditor.Logger.LogWarning <NodeVariable>("Variable ({0}) spawned with a null variable. The variable probably doesn't exist.", ID); } else { _variable = variable; _variable.PreTypeChanged += Variable_PreTypeChanged; _variable.PostTypeChanged += Variable_PostTypeChanged; _variable.Removed += Variable_Removed; SpawnPins(); } }
public NodeVariableData(NodeGraphVariable variable, NodeGraphVariableAccessorType accessorType, string id) : base(typeof(NodeVariable), id, "Variable") { VariableID = variable.ID; AccessorType = accessorType; }
void SpawnNodeFromFocusedVariable(NodeGraphVariable variable, NodeGraphVariableAccessorType accessorType) { AddVariableNode.InvokeSafe(new AddNodeVariableArgs(variable, accessorType)); }
public AddNodeVariableArgs(NodeGraphVariable variable, NodeGraphVariableAccessorType accessorType) { Variable = variable; AccessorType = accessorType; }