Skip to content

Fix preview scene objects marked dirty by migration #6361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down