Search Issue Tracker
Not Reproducible
Votes
1
Found in
5.6.0b5
Issue ID
873830
Regression
Yes
Reverting prefab instance throws IndexOutOfRangeException
Steps to reproduce:
1. Open attached project
2. Open scene "repro"
3. In hierarchy select "GameObject" prefab instance
4. Add any component (Box Collider, for example)
5. Press "Revert" to revert to original prefab
6. Notice IndexOutOfRangeException in the console
IndexOutOfRangeException: Array index is out of range.
UnityEditor.InspectorWindow.EditorHasLargeHeader (Int32 editorIndex) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1287)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1088)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1024)
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:359)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Reproduced with: 5.6.0b5
Comments (3)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
FlorentFal
Sep 08, 2017 13:31
Same problem on 5.6.0f3 when adding a Monobehavior script to a gameobject via custom inspector.
correia55
May 19, 2017 10:44
We have the same problem as LUKEDAWN, when destroying a component withing a custom inspector.
LukeDawn
Apr 04, 2017 08:23
I am getting this error when a custom inspector destroys a component on a gameobject. In 5.6.0f4