Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/SampleScene.unity“ Scene
3. Open the “GameOject” prefab in context mode (click the Arrow to the right of the prefab instance)
4. Enable the Show Overrides toggle in the Prefab bar
5. Change the value to 6 in the Inspector window
6. Save the prefab (Ctrl/Cmd + S)
7. Observe the Console window
Expected result: No error is thrown
Actual result: “The serialized array of [SerializeReference] objects is missing entry for Refid -2” error is thrown
Reproducible with: 2022.3.28f1, 6000.0.1f1
Couldn't test with: 2021.3.38f1 (editor crashed when opening a prefab in context mode)
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Notes:
- Not reproducible when Show Overrides is disabled
- Reproducible when enabling and disabling Show Overrides