Skip to content

Commit

Permalink
Merge pull request #1369 from anatawa12/fix-overflow-exception
Browse files Browse the repository at this point in the history
fix: OverflowException when creating prefab
  • Loading branch information
anatawa12 authored Dec 8, 2024
2 parents a681655 + 9914987 commit 7881f7b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-PRERELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static void OnValidate<TComponent>(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
Expand Down

0 comments on commit 7881f7b

Please sign in to comment.