From bb69e7311aaa5574b0c1dbbfe73a4044d8195ed9 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Wed, 24 Feb 2021 17:35:36 +0100 Subject: [PATCH 1/2] Fixed nullref when adding a volume component in a Volume profile asset --- .../Editor/Volume/VolumeComponentListEditor.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs index 147832853b0..3e7c3ae9880 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs @@ -355,17 +355,17 @@ internal void AddComponent(Type type) var componentProp = m_ComponentsProperty.GetArrayElementAtIndex(m_ComponentsProperty.arraySize - 1); componentProp.objectReferenceValue = component; + // Create & store the internal editor object for this effect + CreateEditor(component, componentProp, forceOpen: true); + + m_SerializedObject.ApplyModifiedProperties(); + // Force save / refresh if (EditorUtility.IsPersistent(asset)) { EditorUtility.SetDirty(asset); AssetDatabase.SaveAssets(); } - - // Create & store the internal editor object for this effect - CreateEditor(component, componentProp, forceOpen: true); - - m_SerializedObject.ApplyModifiedProperties(); } internal void RemoveComponent(int id) From dcbd6c34e8cc8b7d5839349490190638b39537b5 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Wed, 24 Feb 2021 17:36:10 +0100 Subject: [PATCH 2/2] Updated 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 69bf8fc7e0d..2acb86c4ff9 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed decals in material debug display. - Fixed WouldFitInAtlas that would previously return wrong results if any one face of a point light would fit (it used to return true even though the light in entirety wouldn't fit). - Fixed loss of persistency of ratio between pivot position and size when sliding by 0 in DecalProjector inspector (case 1308338) +- Fixed nullref when adding a volume component in a Volume profile asset (case 1317156). ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard