Search Issue Tracker
Fixed in 2021.1.X
Votes
0
Found in
2021.1.0a6
2021.1.0a7
Issue ID
1294726
Regression
Yes
[2D] NullReferenceException thrown continuously on selecting Sprite Atlas V2(Experimental) Mode is selected in Editor Settings
When Sprite Atlas asset is selected in the Project window and "Sprite Atlas V2(Experimental) - Enabled" Sprite Packer Mode is selected in the Editor settings window then it causes the editor to throw NullReferenceException continuously, Refer to attached video.
Steps to repro:
1. Create a new project with a 2D Template
2. Project > Create > 2D > Sprite Atlas
3. Edit > Project Settings > Editor > Sprite Packer > Sprite Atlas V2(Experimental) - Enabled
4. Project > New Sprite Atlas > Select
Actual Result: NullReferenceException is thrown when Sprite Atlas asset is selected in the Project window and "Sprite Atlas V2(Experimental) - Enabled" Sprite Packer Mode is selected in the Editor settings window
Expected result: "Sprite Atlas V2(Experimental) - Enabled" Sprite Packer Mode is selected gracefully
Occurring in:
2021.1.0a7, 2021.1.0a6
Working fine in:
2021.1.0a5, 2020.2.0b13, 2020.1.12f1
Environment:
Windows10 and macOS 10.15
Stack trace:
NullReferenceException: Alpha Dilation: SerializedProperty is null
UnityEditor.EditorGUI.BeginPropertyInternal (UnityEngine.Rect totalPosition, UnityEngine.GUIContent label, UnityEditor.SerializedProperty property) (at <2e08b753a9374ad482284720aea4656b>:0)
UnityEditor.EditorGUI.BeginProperty (UnityEngine.Rect totalPosition, UnityEngine.GUIContent label, UnityEditor.SerializedProperty property) (at <2e08b753a9374ad482284720aea4656b>:0)
UnityEditor.U2D.SpriteAtlasImporterInspector.HandleBoolToIntPropertyField (UnityEditor.SerializedProperty prop, UnityEngine.GUIContent content) (at <2e08b753a9374ad482284720aea4656b>:0)
UnityEditor.U2D.SpriteAtlasImporterInspector.HandleMasterSettingUI () (at <2e08b753a9374ad482284720aea4656b>:0)
UnityEditor.U2D.SpriteAtlasImporterInspector.OnInspectorGUI () (at <2e08b753a9374ad482284720aea4656b>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <a3d19fcb75d5423995f038fd978f8223>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
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
Resolution Note (fix version 2021.1):
A fix for this issue will be available on Unity 2021.1.0a9 and above