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 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