From 68180471ed8e3a69cdbe1b41186c084a5e79025e Mon Sep 17 00:00:00 2001 From: martint-unity Date: Wed, 20 Jan 2021 09:42:22 +0100 Subject: [PATCH] backport pr 2977 undo additional light issue --- com.unity.render-pipelines.universal/CHANGELOG.md | 1 + .../Editor/UniversalRenderPipelineAssetEditor.cs | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index a7d26e3804f..fcf764b599f 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed GC allocations from XR occlusion mesh when using multipass. - Fixed an issue where Universal Render Pipeline with disabled antiAliasing was overwriting QualitySettings.asset on frequent cases. [case 1219159](https://issuetracker.unity3d.com/issues/urp-qualitysettings-dot-asset-file-gets-overwritten-with-the-same-content-when-the-editor-is-closed) - Fixed a case where overlay camera with output texture caused base camera not to render to screen. [case 1283225](https://issuetracker.unity3d.com/issues/game-view-renders-a-black-view-when-having-an-overlay-camera-which-had-output-texture-assigned-in-the-camera-stack) +- Fixed an undo issues for additional light property on the UniversalRenderPipeline Asset. ## [10.2.0] - 2020-10-19 diff --git a/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAssetEditor.cs b/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAssetEditor.cs index 78ce72eb77e..d459177243b 100644 --- a/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAssetEditor.cs +++ b/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAssetEditor.cs @@ -136,7 +136,6 @@ internal class Styles SerializedProperty m_ShaderVariantLogLevel; - LightRenderingMode selectedLightRenderingMode; SerializedProperty m_ColorGradingMode; SerializedProperty m_ColorGradingLutSize; @@ -216,8 +215,6 @@ void OnEnable() m_UseAdaptivePerformance = serializedObject.FindProperty("m_UseAdaptivePerformance"); - selectedLightRenderingMode = (LightRenderingMode)m_AdditionalLightsRenderingModeProp.intValue; - string Key = "Universal_Shadow_Setting_Unit:UI_State"; m_State = new EditorPrefBoolFlags(Key); } @@ -305,8 +302,7 @@ void DrawLightingSettings() EditorGUILayout.Space(); // Additional light - selectedLightRenderingMode = (LightRenderingMode)EditorGUILayout.EnumPopup(Styles.addditionalLightsRenderingModeText, selectedLightRenderingMode); - m_AdditionalLightsRenderingModeProp.intValue = (int)selectedLightRenderingMode; + EditorGUILayout.PropertyField(m_AdditionalLightsRenderingModeProp, Styles.addditionalLightsRenderingModeText); EditorGUI.indentLevel++; disableGroup = m_AdditionalLightsRenderingModeProp.intValue == (int)LightRenderingMode.Disabled;