From e112d73abed55665bd7f85e9032ff5c6506dfaac Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Fri, 20 Dec 2024 01:29:14 +0900 Subject: [PATCH 1/2] fix: prefab overrides are reverted on first load of the scene at first launch --- .../PrefabSafeUniqueCollectionRuntimeEditorImpl.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Internal/PrefabSafeSet/Editor/UniqueCollection/PrefabSafeUniqueCollectionRuntimeEditorImpl.cs b/Internal/PrefabSafeSet/Editor/UniqueCollection/PrefabSafeUniqueCollectionRuntimeEditorImpl.cs index 033c04c5..39eb1e64 100644 --- a/Internal/PrefabSafeSet/Editor/UniqueCollection/PrefabSafeUniqueCollectionRuntimeEditorImpl.cs +++ b/Internal/PrefabSafeSet/Editor/UniqueCollection/PrefabSafeUniqueCollectionRuntimeEditorImpl.cs @@ -39,7 +39,8 @@ public static void OnValidate(TComponent component, var newCorrespondingObject = PrefabUtility.GetCorrespondingObjectFromSource(component); if (newCorrespondingObject != null && PrefabUtility.GetCorrespondingObjectFromSource(newCorrespondingObject) == - PrefabSafeUniqueCollection.CorrespondingObject) + PrefabSafeUniqueCollection.CorrespondingObject + && !PrefabSafeUniqueCollection.IsNew) // not loading scene { // this might be creating prefab. we do more checks var newCorrespondingPrefabSafeUniqueCollection = getPrefabSafeUniqueCollection(newCorrespondingObject); From 5bbe3f49538c7fd44c3eeaeb6827e839965fb50c Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Sat, 21 Dec 2024 23:46:54 +0900 Subject: [PATCH 2/2] docs(changelog): Prefab overrides on the scene are reverted on first load of the scene at first launch --- CHANGELOG-PRERELEASE.md | 1 + CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG-PRERELEASE.md b/CHANGELOG-PRERELEASE.md index 21387b52..704189f0 100644 --- a/CHANGELOG-PRERELEASE.md +++ b/CHANGELOG-PRERELEASE.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog]. ### Removed ### Fixed +- Prefab overrides on the scene are reverted on first load of the scene at first launch `#1372` ### Security diff --git a/CHANGELOG.md b/CHANGELOG.md index 6328dd6e..764bf7cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog]. ### Removed ### Fixed +- Prefab overrides on the scene are reverted on first load of the scene at first launch `#1372` ### Security