示例#1
0
        /// <summary>
        /// Removes the connection of this port to the specified port if existant
        /// </summary>
        public void RemoveConnection(ConnectionPort port, bool silent = false)
        {
            if (port == null)
            {
                connections.RemoveAll(p => p != null);
                return;
            }

            if (!silent)
            {
                NodeEditorCallbacks.IssueOnRemoveConnection(this, port);
            }
            port.connections.Remove(this);
            connections.Remove(port);
            port.body.OnRemoveConnection(port, this);
            body.OnRemoveConnection(this, port);
            if (!silent)
            {
                NodeEditor.curNodeCanvas.OnNodeChange(body);
            }
        }