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
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
- Profiler - Taking you to the wrong section when using 'show'
- Draw Renderers custom pass doesn't work with SSGI
- WebCamTexture does not set the requested resolution when used in WebGL
- Editor default Stylesheet/Matching Selector buttons in Debugger don't do anything
- Graphics.DrawMeshNow stops rendering Render Texture after a few frames when viewed in the Player
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