From 2246be977545f33dd9beeadb321f6d5517e5da0d Mon Sep 17 00:00:00 2001 From: Arttu Peltonen Date: Mon, 22 Nov 2021 16:52:01 +0200 Subject: [PATCH 1/2] Don't mark objects as dirty during migration if they are part of the preview scene --- .../Runtime/Core/Migration/MigrationDescription.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 From 5ce23aa6278e248b21366ef0841580b5faf8e4ae Mon Sep 17 00:00:00 2001 From: Arttu Peltonen Date: Thu, 25 Nov 2021 13:19:01 +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 34692daf2a6..6446a59584b 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed custom shader GUI for material inspector. - Fixed custom pass utils Blur and Copy functions in XR. - Fixed the ray tracing acceleration structure build marker not being included in the ray tracing stats (case 1379383). +- Fixed objects belonging to preview scenes being marked as dirty during migration (case 1367204). ### Changed - Optimizations for the physically based depth of field.