Search Issue Tracker
Fixed in 2019.3.X
Fixed in 2019.2.X
[Sprite Atlas] "NullReferenceException" on entering in play mode when a sprite is packed in the "Sprite Atlas"
"NullReferenceException" on entering in play mode when a sprite is packed in the "Sprite Atlas"
Steps to repro:
1. Create a new project with 2D template
2. Import any sprite into the project window
3. Project View > Create > Sprite Atlas
4. Select created Sprite Atlas from Project View.
5. Add imported sprite in "Objects for Packing" under Sprite Atlas
6. Click on "Pack Preview" button
7. Enter in Play Mode
Editor throws NullReferenceException when a sprite is packed and entered in play mode
Sprites are packed without any errors
2019.2.0a11, 2019.2.0a7, 2019.1.0f1, 2019.1.0b6
Working Fine on:
2019.2.0a6, 2019.1.0b5, 2019.1.0a15, 2018.3.0f2
Windows 10 and MacOS 10.14
Refer attached video.
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.U2D.SpriteAtlasInspector.OnPreviewSettings () (at C:/buildslave/unity/build/Editor/Mono/2D/SpriteAtlas/SpriteAtlasInspector.cs:601)
UnityEditor.InspectorWindow.DrawPreviewAndLabels () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1042)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:278)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- New input system Windows native backend gets stuck in infinite loop when USB HID device with 0xFFFF usage max is plugged in
- Superluminal fails to resolve symbols after mono upgrade
- Windows Standalone player builds with Mono scripting backend don't run on fresh windows installs
- RootEditor predicate for GameObjects disables Drag and Drop in the Scene View
- Slider OnValueChanged event is not called when changing value from the Inspector