1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 01:06:01 +08:00

Merge pull request #341 from RomanZanevski/patch-1

Fix OnRemoveConnection from calling side
This commit is contained in:
Thor Brigsted 2022-04-28 16:50:09 +02:00 committed by GitHub
commit 4e15a2110e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -296,12 +296,13 @@ namespace XNode {
for (int i = 0; i < port.connections.Count; i++) {
if (port.connections[i].Port == this) {
port.connections.RemoveAt(i);
// Trigger OnRemoveConnection from this side port
port.node.OnRemoveConnection(port);
}
}
}
// Trigger OnRemoveConnection
node.OnRemoveConnection(this);
if (port != null && port.IsConnectedTo(this)) port.node.OnRemoveConnection(port);
}
/// <summary> Disconnect this port from another port </summary>