public void RemoveConnection(Connection connection) { OnConnectionRemoval(connection); Target.RemoveConnection(connection); DestroyHelper.Destroy(connection); //Object.DestroyImmediate(connection, true); }
public void RemoveNode(Node node) { //Do not trust Unity. OnNodeRemoval(node); Target.RemoveNode(node); DestroyHelper.Destroy(node); //Object.DestroyImmediate(node, true); //TODO: Expand Undo Functionality. //Undo.DestroyObjectImmediate(node); }
private void OnDestroy() { //Debug.Log("YOLO!"); //Do not trust Unity. Disconnect(); foreach (Instruction connectionModifier in _instructions) { DestroyHelper.Destroy(connectionModifier); } //DestroyImmediate(connectionModifier, true); _instructions.Clear(); Graph.RemoveConnection(this); }
private void OnDestroy() { foreach (var connection in _connections) { DestroyHelper.Destroy(connection); } //DestroyImmediate(connection, true); foreach (var node in _nodes) { DestroyHelper.Destroy(node); } //DestroyImmediate(node, true); _connections.Clear(); _nodes.Clear(); }
public void RemoveConnectionModifier(Instruction instruction) { instruction.Connection.RemoveInstruction(instruction); DestroyHelper.Destroy(instruction); //Object.DestroyImmediate(connectionModifier, true); }