Search Issue Tracker
Fixed in 2.0.0-preview.4
Votes
1
Found in [Package]
1.0.10
Issue ID
1126489
Regression
Yes
[2D SpriteShape] Creating a new Strip/Shape Sprite Shape Profile throws a NullReferenceException
Reproduction steps:
1. Create a new project and add 2D SpriteShape package
2. Try to create a new Strip/Shape Sprite Shape Profile
Expected result: New Sprite Shape Profile is created without any issues
Actual result: New Sprite Shape Profile is created, but NullReferenceException is thrown
Not reproducible with: 2018.3.7f1, 2019.1.0a9
Reproducible with: 2019.1.0a10, 2019.1.0b5, 2019.2.0a6
Could not test with: 2017.4, 2019.2.0a7
Notes: Tested with package versions - 1.0.10, 1.0.11, 1.0.12, 1.0.12-preview.1
Could not test with 2019.2.0a7 since an error is thrown right after 2D Sprite Shape package is added to the project
Creating an empty Sprite Shape Profile in 1.0.12-preview.1 does not cause the issue. However, if "Create Range" is pressed the same error is thrown
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.U2D.SpriteShapeEditor.GetPreviewSpriteIndexFromSessionState (System.Int32 rangeIndex) (at Library/PackageCache/com.unity.2d.spriteshape@1.0.12-preview.1/Editor/SpriteShapeEditor.cs:252)
UnityEditor.U2D.SpriteShapeEditor.HandleSpritePreviewCycle (UnityEngine.Rect rect) (at Library/PackageCache/com.unity.2d.spriteshape@1.0.12-preview.1/Editor/SpriteShapeEditor.cs:579)
UnityEditor.U2D.SpriteShapeEditor.DoRangesGUI () (at Library/PackageCache/com.unity.2d.spriteshape@1.0.12-preview.1/Editor/SpriteShapeEditor.cs:501)
UnityEditor.U2D.SpriteShapeEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.2d.spriteshape@1.0.12-preview.1/Editor/SpriteShapeEditor.cs:288)
UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:440)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “ValidateSchema Error2” error is thrown in the Player when using IL2CPP Scripting Backend
- Symbolic links disappear when a .xcframework file is added through the Unity Editor
- Errors regarding importing occur upon opening a project when the "Library" folder is deleted
- MeshRenderer.sortingLayerID cannot be changed when change is being done in a built Player
- Warnings related to App Icon are being thrown when building project to VisionOS Platform
Add comment