Skip to content

Commit ab2a6ea

Browse files
committed
Input socket single connection type disconnect issue fixed
1 parent 2f0fa5a commit ab2a6ea

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Assets/Examples/1_ColorEditor/Resources/Nodes/ColorDisplay.prefab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ PrefabInstance:
518518
- target: {fileID: 2037711194971394908, guid: 08a2cede52f8c4446ba4b9e7b0d17783,
519519
type: 3}
520520
propertyPath: connectionType
521-
value: 1
521+
value: 0
522522
objectReference: {fileID: 0}
523523
- target: {fileID: 4426410529968217237, guid: 08a2cede52f8c4446ba4b9e7b0d17783,
524524
type: 3}
@@ -660,7 +660,7 @@ PrefabInstance:
660660
- target: {fileID: 2037711194971394908, guid: 08a2cede52f8c4446ba4b9e7b0d17783,
661661
type: 3}
662662
propertyPath: connectionType
663-
value: 1
663+
value: 0
664664
objectReference: {fileID: 0}
665665
- target: {fileID: 4426410529968217237, guid: 08a2cede52f8c4446ba4b9e7b0d17783,
666666
type: 3}
@@ -802,7 +802,7 @@ PrefabInstance:
802802
- target: {fileID: 2037711194971394908, guid: 08a2cede52f8c4446ba4b9e7b0d17783,
803803
type: 3}
804804
propertyPath: connectionType
805-
value: 1
805+
value: 0
806806
objectReference: {fileID: 0}
807807
- target: {fileID: 4426410529968217237, guid: 08a2cede52f8c4446ba4b9e7b0d17783,
808808
type: 3}

Assets/Examples/1_ColorEditor/Scripts/ColorDisplayNode.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ public class ColorDisplayNode : Node
1717

1818
public override void Setup()
1919
{
20+
rInput.connectionType = ConnectionType.Single;
21+
gInput.connectionType = ConnectionType.Single;
22+
bInput.connectionType = ConnectionType.Single;
23+
2024
Register(rInput);
2125
Register(gInput);
2226
Register(bInput);

Assets/RuntimeNodeEditor/Scripts/Graph/NodeGraph.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ public void Disconnect(Connection conn)
117117

118118
public void Disconnect(SocketInput input)
119119
{
120-
foreach (var conn in input.Connections)
120+
var dcList = new List<Connection>(input.Connections);
121+
foreach (var conn in dcList)
121122
{
122123
Disconnect(conn);
123124
}

0 commit comments

Comments
 (0)