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.
- [Linux] Executing Build And Run with Dedicated Server platform does not open Terminal
- [deprecated] BuildOptions.EnableHeadlessMode needs clearer warning for its conflicts with BuildOptions.subtarget field
- UNITY_SERVER scripting define does not work when switching to Dedicated Server from Windows by script
- Editor crashes when opening it with "-standaloneBuildSubtarget Server" CLI
- [Hub] Templates are missing in Hub 3.0.0-beta.2 when creating new project for Unity 2022.1