From b9171b64c884ca1e27c47bebbcbae28939e98e02 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 6 Aug 2020 12:09:43 +0200 Subject: [PATCH 1/2] Change the profile every time the inspector is on --- .../DiffusionProfile/DiffusionProfileSettingsEditor.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileSettingsEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileSettingsEditor.cs index d18fe75c9ac..e061c8844f4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileSettingsEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileSettingsEditor.cs @@ -131,7 +131,9 @@ public override void OnInspectorGUI() serializedObject.ApplyModifiedProperties(); - if (scope.changed) + // NOTE: We cannot change only upon scope changed since there is no callback when Reset is triggered for Editor and the scope is not changed when Reset is called. + // The following operations are not super cheap, but are not overly expensive, so we instead trigger the change every time inspector is drawn. + // if (scope.changed) { // Validate and update the cache for this profile only profile.objReference.Validate(); From 930934a6260c4c2189d14b9c19e3ed725e757b78 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 6 Aug 2020 12:12:02 +0200 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 9be03c6b5f4..651161dae6b 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -767,6 +767,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed error about layers when disabling emissive mesh for area lights. - Fix issue when the user deletes the composition graph or .asset in runtime (case 1263319) - Fixed assertion failure when changing resolution to compositor layers after using AOVs (case 1265023) +- Fixed issue with diffusion profile not being updated upon reset of the editor. ### Changed - Improve MIP selection for decals on Transparents