Skip to content

Commit a2a347c

Browse files
jsm174freezy
authored andcommitted
misc: update lamp sequence to find all lights in a mapping
1 parent c7fbafb commit a2a347c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Runtime/Nodes/Lamps/LampSequenceUnit.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,11 @@ private ControlOutput Process(Flow flow)
144144
foreach (var input in multiInputs) {
145145
var lampId = flow.GetValue<string>(input);
146146

147-
var mapping = Player.LampMapping.FirstOrDefault(l => l.Id == lampId);
148-
if (mapping != null) {
149-
UpdateLightComponentCache(mapping.Device, lampId);
147+
var mappingList = Player.LampMapping.Where(l => l.Id == lampId);
148+
if (mappingList.Any()) {
149+
foreach (var mapping in mappingList) {
150+
UpdateLightComponentCache(mapping.Device, lampId);
151+
}
150152
}
151153
else {
152154
Debug.LogError($"Unknown lamp ID {lampId}.");

0 commit comments

Comments
 (0)