diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 79ae1fdbe78..519816eb530 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed flickering / edge aliasing issue when DoF and TAAU or DLSS are enabled (case 1381858). - Fixed SpeedTree graph compatibility by adding raytracing quality keyword to provide a safe path. - Fixed options to trigger cached shadows updates on light transform changes. +- Fixed objects belonging to preview scenes being marked as dirty during migration (case 1367204). ### Changed - Optimizations for the physically based depth of field. 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 4387472d02e..69de711ac25 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 @@ -125,7 +125,11 @@ public bool Migrate(TTarget target) UnityEditor.EditorApplication.delayCall += () => { if (targetObject != null && !targetObject.Equals(null)) - UnityEditor.EditorUtility.SetDirty(targetObject); + { + // Only dirty the object's scene if it can be saved, preview scenes are not saved (case 1367204). + if (!UnityEditor.SceneManagement.EditorSceneManager.IsPreviewSceneObject(targetObject)) + UnityEditor.EditorUtility.SetDirty(targetObject); + } }; } #endif