From 41655790fb46e55c06bcafd9a034575736e3a436 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Sun, 8 Dec 2024 18:51:46 +0900 Subject: [PATCH 1/2] fix: OverflowException when create prefab --- .../PrefabSafeUniqueCollectionRuntimeEditorImpl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Internal/PrefabSafeSet/Editor/UniqueCollection/PrefabSafeUniqueCollectionRuntimeEditorImpl.cs b/Internal/PrefabSafeSet/Editor/UniqueCollection/PrefabSafeUniqueCollectionRuntimeEditorImpl.cs index e9c6d6ca..033c04c5 100644 --- a/Internal/PrefabSafeSet/Editor/UniqueCollection/PrefabSafeUniqueCollectionRuntimeEditorImpl.cs +++ b/Internal/PrefabSafeSet/Editor/UniqueCollection/PrefabSafeUniqueCollectionRuntimeEditorImpl.cs @@ -58,7 +58,7 @@ public static void OnValidate(TComponent component, PrefabSafeUniqueCollection.NestCount = nestCount; var shouldUsePrefabOnSceneLayer = - PSUCRuntimeUtil.ShouldUsePrefabOnSceneLayer(component); + nestCount != 0 && PSUCRuntimeUtil.ShouldUsePrefabOnSceneLayer(component); var maxLayerCount = shouldUsePrefabOnSceneLayer ? nestCount - 1 : nestCount; // https://github.com/anatawa12/AvatarOptimizer/issues/52 From 9914987513a559f3ec71fa72b8120ee9a5aa6f21 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Sun, 8 Dec 2024 18:53:32 +0900 Subject: [PATCH 2/2] docs(changelog): OverflowException when creating prefab --- CHANGELOG-PRERELEASE.md | 1 + CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG-PRERELEASE.md b/CHANGELOG-PRERELEASE.md index 717a02bd..f9aaa964 100644 --- a/CHANGELOG-PRERELEASE.md +++ b/CHANGELOG-PRERELEASE.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog]. - Errors with models with UV at very edge `#1363` - Errors if exactly same AnimatorController is specified for multiple playable layers `#1366` - Errors if objects removed by some component is listed on exclusions of Trace and Optimize `#1367` +- OverflowException when creating prefab `#1369` ### Security diff --git a/CHANGELOG.md b/CHANGELOG.md index b0e5a29b..100334d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog]. - Errors with models with UV at very edge `#1363` - Errors if exactly same AnimatorController is specified for multiple playable layers `#1366` - Errors if objects removed by some component is listed on exclusions of Trace and Optimize `#1367` +- OverflowException when creating prefab `#1369` ### Security