|
|
|
|
|
|
return new Dictionary<SerializationHelper.TypeSerializationInfo, SerializationHelper.TypeSerializationInfo>(); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual IEdge Connect(SlotReference fromSlotRef, SlotReference toSlotRef) |
|
|
|
IEdge ConnectNoValidate(SlotReference fromSlotRef, SlotReference toSlotRef) |
|
|
|
{ |
|
|
|
if (fromSlotRef == null || toSlotRef == null) |
|
|
|
return null; |
|
|
|
|
|
|
AddEdgeToNodeEdges(newEdge); |
|
|
|
|
|
|
|
Debug.Log("Connected edge: " + newEdge); |
|
|
|
return newEdge; |
|
|
|
} |
|
|
|
|
|
|
|
public virtual IEdge Connect(SlotReference fromSlotRef, SlotReference toSlotRef) |
|
|
|
{ |
|
|
|
var newEdge = ConnectNoValidate(fromSlotRef, toSlotRef); |
|
|
|
ValidateGraph(); |
|
|
|
return newEdge; |
|
|
|
} |
|
|
|
|
|
|
removedNodeEdges.Add(edge); |
|
|
|
} |
|
|
|
foreach (var edge in removedNodeEdges) |
|
|
|
RemoveEdge(edge); |
|
|
|
RemoveEdgeNoValidate(edge); |
|
|
|
} |
|
|
|
|
|
|
|
// Remove all nodes and re-add them.
|
|
|
|
|
|
|
foreach (var node in m_Nodes.Values) |
|
|
|
removedNodeGuids.Add(node.guid); |
|
|
|
foreach (var nodeGuid in removedNodeGuids) |
|
|
|
RemoveNode(m_Nodes[nodeGuid]); |
|
|
|
RemoveNodeNoValidate(m_Nodes[nodeGuid]); |
|
|
|
|
|
|
|
ValidateGraph(); |
|
|
|
AddNode(node); |
|
|
|
AddNodeNoValidate(node); |
|
|
|
} |
|
|
|
|
|
|
|
// Add edges from other graph which don't exist in this one.
|
|
|
|
|
|
|
Connect(edge.outputSlot, edge.inputSlot); |
|
|
|
ConnectNoValidate(edge.outputSlot, edge.inputSlot); |
|
|
|
|
|
|
|
ValidateGraph(); |
|
|
|
} |
|
|
|
|
|
|
|
public void OnEnable() |
|
|
|