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

Fixed outOfSync bug in ClearInstancePorts

This commit is contained in:
Thor Brigsted 2018-01-26 12:16:11 +01:00
parent cf348d495b
commit 73172a1c48
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -20,5 +20,6 @@
# Unity3D Generated File On Crash Reports
sysinfo.txt
/Examples/
README.md.meta
LICENSE.md.meta

View File

@ -124,7 +124,8 @@ namespace XNode {
/// <summary> Removes all instance ports from the node </summary>
[ContextMenu("Clear instance ports")]
public void ClearInstancePorts() {
foreach (NodePort port in InstancePorts) {
List<NodePort> instancePorts = new List<NodePort>(InstancePorts);
foreach (NodePort port in instancePorts) {
RemoveInstancePort(port);
}
}