Search Issue Tracker
Fixed in 2017.1.X
Votes
0
Found in
Issue ID
898765
Regression
No
IndexOutOfRangeException when repacking a multi-paged sprite atlas into a single-page sprite atlas
IndexOutOfRangeException when repacking a multi-paged sprite atlas into a single-page sprite atlas
1. Import MetalMan texture into project
2. Set Sprite Mode to multiple and slice it in Sprite Editor
3. Right click -> Create -> Sprite Atlas
4. Change "Max Texture Size" of atlas to 512, select MetalMan to pack
5. Pack Preview
6. Select page 3 above the preview
7. Change "Max Texture Size" of atlas to 2048
8. Pack Preview
Expected: No errors, and the preview is correctly updated
Observed: IndexOutOfRangeException, and the preview is not updated
IndexOutOfRangeException: Array index is out of range.
UnityEditor.U2D.SpriteAtlasInspector.OnPreviewSettings () (at /Users/weswong/Work/trunk/unity/Editor/Mono/2D/SpriteAtlas/SpriteAtlasInspector.cs:394)
UnityEditor.InspectorWindow.DrawPreviewAndLabels () (at /Users/weswong/Work/trunk/unity/Editor/Mono/Inspector/InspectorWindow.cs:711)
UnityEditor.InspectorWindow.OnGUI () (at /Users/weswong/Work/trunk/unity/Editor/Mono/Inspector/InspectorWindow.cs:395)
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)
IndexOutOfRangeException: Array index is out of range.
UnityEditor.U2D.SpriteAtlasInspector.OnPreviewGUI (Rect r, UnityEngine.GUIStyle background) (at /Users/weswong/Work/trunk/unity/Editor/Mono/2D/SpriteAtlas/SpriteAtlasInspector.cs:414)
UnityEditor.Editor.OnHeaderIconGUI (Rect iconRect) (at /Users/weswong/Work/trunk/unity/Editor/Mono/Inspector/Editor.cs:419)
UnityEditor.Editor.DrawHeaderGUI (UnityEditor.Editor editor, System.String header, Single leftMargin) (at /Users/weswong/Work/trunk/unity/Editor/Mono/Inspector/Editor.cs:499)
UnityEditor.Editor.DrawHeaderGUI (UnityEditor.Editor editor, System.String header) (at /Users/weswong/Work/trunk/unity/Editor/Mono/Inspector/Editor.cs:465)
UnityEditor.Editor.OnHeaderGUI () (at /Users/weswong/Work/trunk/unity/Editor/Mono/Inspector/Editor.cs:361)
UnityEditor.Editor.DrawHeader () (at /Users/weswong/Work/trunk/unity/Editor/Mono/Inspector/Editor.cs:354)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/weswong/Work/trunk/unity/Editor/Mono/Inspector/InspectorWindow.cs:1094)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/weswong/Work/trunk/unity/Editor/Mono/Inspector/InspectorWindow.cs:1008)
UnityEditor.InspectorWindow.OnGUI () (at /Users/weswong/Work/trunk/unity/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)
Occurring on: 2017.1.0a5 onwards
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 when D3D12RenderPass::SetupDeviceResources when opening FBX animation preview
- Serialization errors are thrown when "com.unity.render-pipelines.core" is added as a custom package and Graphics window is opened
- Character Joints unexpectedly rotate when a ragdoll is created using the Ragdoll Wizard
- Crash on GfxDeviceD3D11Base::DrawBuffersBatchMode when rendering the Scene view
- The shared EditorBuildSettings.asset file of symlinked projects is not updated when changing the order of the Scenes in Build Settings in one of the projects
Add comment