Search Issue Tracker
Fixed
Votes
0
Found in
2019.1.0b2
2019.1.0b4
Issue ID
1127682
Regression
No
[Asset Import] "IndexOutOfRangeException" is thrown on creating a preset of the Scene
Scene Preset is not created and "IndexOutOfRangeException" is thrown in the console
Steps to repro:
1. Create a new project.
2. Double click on "SampleScene" in Project Window
3. Click on the Preset icon in Inspector
Actual Result:
Scene preset is not created and "IndexOutOfRangeException" is thrown in the console
Expected Result:
Scene Preset is created without any errors
Note:
Creating a Scene Preset feature is introduced in 2019.1.0b2
Reproducible on:
2019.1.0b4, 2019.1.0b2
Works fine on:
2019.2.0a6
Environment:
Windows and MacOS
Stack Trace:
IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEditor.Presets.PresetContextMenu.CreateAndShow (UnityEngine.Object[] targets) (at C:/buildslave/unity/build/Modules/PresetsEditor/PresetContextMenu.cs:31)
UnityEditor.Presets.PresetSelector.DrawPresetButton (UnityEngine.Rect rectangle, UnityEngine.Object[] targets) (at C:/buildslave/unity/build/Modules/PresetsEditor/PresetSelector.cs:111)
UnityEditor.EditorGUIUtility.DrawEditorHeaderItems (UnityEngine.Rect rectangle, UnityEngine.Object[] targetObjs) (at C:/buildslave/unity/build/Editor/Mono/EditorGUIUtility.cs:243)
UnityEditor.Editor.DrawHeaderHelpAndSettingsGUI (UnityEngine.Rect r) (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:826)
UnityEditor.Editor.DrawHeaderGUI (UnityEditor.Editor editor, System.String header, System.Single leftMargin) (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:887)
UnityEditor.Editor.DrawHeaderGUI (UnityEditor.Editor editor, System.String header) (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:843)
UnityEditor.Editor.OnHeaderGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:738)
UnityEditor.Editor.DrawHeader () (at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:697)
UnityEditor.UIElements.EditorElement.DrawEditorLargeHeader (System.Boolean& wasVisible) (at C:/buildslave/unity/build/Editor/Mono/Inspector/EditorElement.cs:206)
UnityEditor.UIElements.EditorElement.DrawEditorHeader (UnityEngine.Object target, System.Boolean& wasVisible) (at C:/buildslave/unity/build/Editor/Mono/Inspector/EditorElement.cs:170)
UnityEditor.UIElements.EditorElement.HeaderOnGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/EditorElement.cs:135)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:292)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:478)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:461)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:441)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/Events/IEventDispatchingStrategy.cs:64)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseEventDispatchingStrategy.cs:58)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:189)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:246)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
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
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
Resolution Note:
This problem has been separated in two issues :
- This default header in the inspector is shown when double clicking on a scene should be removed
- The fact that a preset can be created out of it is wrong, this type of preset will get removed from the list of preset'able types.