From fa9ab06ca2d21b1c271ae8b470527a9b128e9522 Mon Sep 17 00:00:00 2001 From: Jennifer Roig-Deslandes Date: Tue, 23 Mar 2021 10:16:18 +0100 Subject: [PATCH 1/2] Dirtying an asset that was upgraded to a new Version --- .../Runtime/Core/Migration/MigrationDescription.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Core/Migration/MigrationDescription.cs b/com.unity.render-pipelines.high-definition/Runtime/Core/Migration/MigrationDescription.cs index 5502236453f..7cb54df3647 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Core/Migration/MigrationDescription.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Core/Migration/MigrationDescription.cs @@ -104,10 +104,16 @@ public bool Migrate(TTarget target) } #if UNITY_EDITOR - // Special in prefab case - if (target is UnityEngine.Object && UnityEditor.PrefabUtility.IsPartOfNonAssetPrefabInstance(target as UnityEngine.Object)) + UnityEngine.Object targetObject = target as UnityEngine.Object; + if (targetObject != null) { - UnityEditor.PrefabUtility.RecordPrefabInstancePropertyModifications(target as UnityEngine.Object); + // Special in prefab case + if (UnityEditor.PrefabUtility.IsPartOfNonAssetPrefabInstance(targetObject)) + { + UnityEditor.PrefabUtility.RecordPrefabInstancePropertyModifications(targetObject); + } + + UnityEditor.EditorUtility.SetDirty(targetObject); } #endif return true; From 234306ca5e27a38b22c0778abaf392b26996b31f Mon Sep 17 00:00:00 2001 From: Jennifer Roig-Deslandes Date: Tue, 23 Mar 2021 11:12:38 +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 dab0e09396a..a61acb8e92f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -111,6 +111,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed preview camera updating the skybox material triggering GI baking (case 1314361/1314373). - The default LookDev volume profile is now copied and referened in the Asset folder instead of the package folder. - Fixed SSS on console platforms. +- Assets going through the migration system are now dirtied. ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard