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.
- [UWP] Solution is created with "Data\Resources" directory which should not exist
- Audio clips on scene end while switching scenes when one scene has Timeline audio playing
- [Hub] Can trigger multiple concurrent Hub installations of the same editor version via Hub link
- [GI - Lightmapper] Invalid texels are not treated the same way in CPU and GPU lightmapper
- Canvas rect returning incorrect size when switching aspect ratios in the Game view