void DisconnectAll(DialogueChoice c) { foreach (var node in cur.Nodes) { if (node == null || node.ID == -1) { continue; } for (int i = 0; i < node.Connections.Length; i++) { var con = node.Connections[i]; int tarID = con.targetChoiceID; int tarCon = con.targetConnectionInput; if (con == null || tarID == -1 || tarCon == -1) { continue; } if (tarID == c.ID) { node.RefreshConnections(i); } } } c.RefreshConnections(); }