From e294c0490451e7a57e037007d258194631f82564 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Mon, 1 Feb 2021 14:42:12 +0100 Subject: [PATCH 1/2] Avoid syncing light layers when we have multiple values. --- .../Editor/Lighting/HDLightUI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index 519becb4da7..c260308fcb2 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -228,7 +228,7 @@ static void DrawGeneralAdditionalContent(SerializedHDLight serialized, Editor ow EditorGUILayout.PropertyField(serialized.lightlayersMask, s_Styles.lightLayer); // If we're not in decoupled mode for light layers, we sync light with shadow layers: - if (serialized.linkLightLayers.boolValue && change.changed) + if (serialized.linkLightLayers.boolValue && change.changed && !serialized.lightlayersMask.hasMultipleDifferentValues) SyncLightAndShadowLayers(serialized, owner); } } @@ -1199,7 +1199,7 @@ static void DrawShadowMapAdditionalContent(SerializedHDLight serialized, Editor if (change.changed) Undo.RecordObjects(owner.targets, "Undo Light Layers Changed"); } - if (!serialized.linkLightLayers.hasMultipleDifferentValues) + if (!serialized.linkLightLayers.hasMultipleDifferentValues && !serialized.lightlayersMask.hasMultipleDifferentValues) { using (new EditorGUI.DisabledGroupScope(serialized.linkLightLayers.boolValue)) { From 58b0fb4cc98d3fb03433d4bfb6312c17b6cb9c3a Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Mon, 1 Feb 2021 15:03:32 +0100 Subject: [PATCH 2/2] Changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index c14362264be..6f31f8cae26 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed an exception when opening the color picker in the material UI (case 1307143). +- Fixed light layer issue when performing editing on multiple lights. ### Changed - Removed the material pass probe volumes evaluation mode.