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
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
- Character animation freezes when toggling animator on/off in a coroutine
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
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