Search Issue Tracker
Fixed in 2019.3.X
Fixed in 2019.2.X
Votes
0
Found in
2019.1.0b6
2019.2.0a7
2019.2.0a11
Issue ID
1144386
Regression
Yes
[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
Actual Result:
Editor throws NullReferenceException when a sprite is packed and entered in play mode
Excepted Result:
Sprites are packed without any errors
Reproducible on:
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
Environment:
Windows 10 and MacOS 10.14
Note:
Refer attached video.
Stack Trace:
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)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Pangovich
Jul 13, 2019 21:20
Блин ребят ну это не дело, уже 4 версию подряд скачиваю. Целый день потратил чтоб найти версию в которой нет данной проблемы и так и не нашел)
jonnic
Jun 27, 2019 08:46
Unity 2019.1.5f1 the bug is still here. Just create an atlas, focus it to see it's properties in Inspector window (it's important), run the game and error message will appear. If you are focusing Inspector on something else, then the game runs just fine
Racot_A
May 13, 2019 14:21
REGRESSION on 2019.1.2.f1
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:592)
UnityEditor.InspectorWindow.DrawPreviewAndLabels () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1052)
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)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)