Search Issue Tracker
Fixed in 2019.3
Fixed in 2019.2
[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.
- Nodes in the Vertex block are deleted when the edge connected to the Node is deleted
- Changes to instanced detail mesh material don't immediately apply
- Undo.RegisterCreatedObjectUndo dirties the scene, but no actual changes to Scene are made
- [Profiler] Scrubbing through filtered frames or sorting their data replaces the displayed data with duplicated data entries
- Errors are thrown and Sub Emitter is not reparented when trying to reparent Sub Emitters of Prefabs