public NodeData(NodeData node, bool keepId = false) { m_name = node.m_name; m_x = node.m_x; m_y = node.m_y; m_inputPoints = new List <ConnectionPointData>(); m_outputPoints = new List <ConnectionPointData>(); if (keepId) { m_id = node.m_id; node.InputPoints.ForEach(p => m_inputPoints.Add(new ConnectionPointData(p))); node.OutputPoints.ForEach(p => m_outputPoints.Add(new ConnectionPointData(p))); } else { m_id = Guid.NewGuid().ToString(); } if (node.Object == null) { m_node = ScriptObjectCatchUtil.Revert(node.Id) as Node; } else { m_node = UnityEngine.Object.Instantiate((UnityEngine.Object)node.Object) as Node; m_node.name = node.Object.name; } }
public bool Validate() { if (m_node == null) { m_node = ScriptObjectCatchUtil.Revert(Id) as Node; } return(Object != null); }
public bool Validate() { if (m_connection == null) { //Debug.Log("Revert:" + Id); m_connection = ScriptObjectCatchUtil.Revert(Id) as Connection; } return(m_connection != null); }