예제 #1
0
        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();
            }
        }
예제 #2
0
 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;
 }