diff --git a/CHANGELOG-PRERELEASE.md b/CHANGELOG-PRERELEASE.md index 1b5f75d59..0c1a326dc 100644 --- a/CHANGELOG-PRERELEASE.md +++ b/CHANGELOG-PRERELEASE.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog]. ### Removed ### Fixed +- PrefabSafesSet's prefab modifications on latest layer are invisible on inspector `#229` ### Security diff --git a/CHANGELOG.md b/CHANGELOG.md index 63f05bade..9beab95c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog]. ### Removed ### Fixed +- PrefabSafesSet's prefab modifications on latest layer are invisible on inspector `#229` ### Security diff --git a/Internal/PrefabSafeSet/Editor/EditorUtil.PrefabModification.cs b/Internal/PrefabSafeSet/Editor/EditorUtil.PrefabModification.cs index d565d2d33..8ef4f1272 100644 --- a/Internal/PrefabSafeSet/Editor/EditorUtil.PrefabModification.cs +++ b/Internal/PrefabSafeSet/Editor/EditorUtil.PrefabModification.cs @@ -110,7 +110,7 @@ private void DoInitializeUpstream() _prefabLayers = _rootProperty.FindPropertyRelative(Names.PrefabLayers); - for (var i = 0; i < _prefabLayers.arraySize - 1; i++) + for (var i = 0; i < _nestCount - 1 && i < _prefabLayers.arraySize; i++) { var layer = _prefabLayers.GetArrayElementAtIndex(i); var removes = layer.FindPropertyRelative(Names.Removes);