mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 09:16:01 +08:00
Improved warning message
This commit is contained in:
parent
75795c59b0
commit
97ec4bbf42
@ -190,7 +190,7 @@ namespace XNode {
|
||||
public void Connect(NodePort port) {
|
||||
if (connections == null) connections = new List<PortConnection>();
|
||||
if (port == null) { Debug.LogWarning("Cannot connect to null port"); return; }
|
||||
if (port == this) { Debug.LogWarning("Attempting to connect port to self."); return; }
|
||||
if (port == this) { Debug.LogWarning("Cannot connect port to self."); return; }
|
||||
if (IsConnectedTo(port)) { Debug.LogWarning("Port already connected. "); return; }
|
||||
if (direction == port.direction) { Debug.LogWarning("Cannot connect two " + (direction == IO.Input ? "input" : "output") + " connections"); return; }
|
||||
if (port.connectionType == Node.ConnectionType.Override && port.ConnectionCount != 0) { port.ClearConnections(); }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user