Skip to content

Commit 2b839dd

Browse files
Fix Undo with added property field for additional lights (#2977)
* added property field additional lights rend mode * updated changelog
1 parent 076a797 commit 2b839dd

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

com.unity.render-pipelines.universal/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
4444
- Fixed shadow cascade blend culling factor.
4545
- Removed Custom.meta which was causing warnings. [case 1314288](https://issuetracker.unity3d.com/issues/urp-warnings-about-missing-metadata-appear-after-installing)
4646
- Fixed a case where shadow fade was clipped too early.
47+
- Fixed undo issues for the additional light property on the UniversalRenderPipeline Asset. [case 1300367]
4748

4849
### Changed
4950
- Change Asset/Create/Shader/Universal Render Pipeline/Lit Shader Graph to Asset/Create/Shader Graph/URP/Lit Shader Graph

com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAssetEditor.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ internal class Styles
149149

150150
SerializedProperty m_ShaderVariantLogLevel;
151151

152-
LightRenderingMode selectedLightRenderingMode;
153152
SerializedProperty m_ColorGradingMode;
154153
SerializedProperty m_ColorGradingLutSize;
155154
SerializedProperty m_UseFastSRGBLinearConversion;
@@ -237,8 +236,6 @@ void OnEnable()
237236

238237
m_UseAdaptivePerformance = serializedObject.FindProperty("m_UseAdaptivePerformance");
239238

240-
selectedLightRenderingMode = (LightRenderingMode)m_AdditionalLightsRenderingModeProp.intValue;
241-
242239
string Key = "Universal_Shadow_Setting_Unit:UI_State";
243240
m_State = new EditorPrefBoolFlags<EditorUtils.Unit>(Key);
244241
}
@@ -326,8 +323,7 @@ void DrawLightingSettings()
326323
EditorGUILayout.Space();
327324

328325
// Additional light
329-
selectedLightRenderingMode = (LightRenderingMode)EditorGUILayout.EnumPopup(Styles.addditionalLightsRenderingModeText, selectedLightRenderingMode);
330-
m_AdditionalLightsRenderingModeProp.intValue = (int)selectedLightRenderingMode;
326+
EditorGUILayout.PropertyField(m_AdditionalLightsRenderingModeProp, Styles.addditionalLightsRenderingModeText);
331327
EditorGUI.indentLevel++;
332328

333329
disableGroup = m_AdditionalLightsRenderingModeProp.intValue == (int)LightRenderingMode.Disabled;

0 commit comments

Comments
 (0)