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

2D

-

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&)

  1. Response avatar

    Resolution Note (fix version 2021.1):

    A fix for this issue will be available on Unity 2021.1.0a9 and above

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.