Search Issue Tracker
Fixed
Fixed in 2021.3.15f1, 2022.2.1f1, 2023.1.0a21
Unknown (hidden) 2020.3.X, 2022.1.X
Votes
0
Found in
2020.3.38f1
2021.3.8f1
2022.1.13f1
2022.2.0b4
2023.1.0a5
Issue ID
UUM-11706
Regression
No
EnumField throws “NullReferenceException” error when the Enum doesn't have the default value of 0
How to reproduce:
1. Open the user’s attached project
2. Select the “Test” GameObject
3. Observe the Console window
Expected result: No error and EnumField is rendered
Actual result: “NullReferenceException” error appears and EnumField is not rendered
Reproducible with: 2020.3.38f1, 2021.3.8f1, 2022.1.13f1, 2022.2.0b4, 2023.1.0a5
Reproduced on: macOS 12.4 (Intel)
Error:
NullReferenceException: Object reference not set to an instance of an object
EnumTestEditor.CreateInspectorGUI () (at Assets/Scripts/Editor/EnumTestEditor.cs:13)
UnityEditor.UIElements.InspectorElement.CreateInspectorElementFromEditor (UnityEditor.Editor editor, System.Boolean reuseIMGUIContainer) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Editor/Inspector/InspectorElement.cs:711)
UnityEditor.UIElements.InspectorElement.Reset (UnityEditor.SerializedObject bindObject) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Editor/Inspector/InspectorElement.cs:297)
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
- Buttons in the Overlay Menu in the Scene View are all gray even if they're activated when Game View is maximized and minimized
- NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
- Editor crashes on PrepareSpriteTilingData when exiting Play mode
Resolution Note (fix version 2023.1.0a21):
Fixed in: 2023.1.0a21
Resolution Note (fix version 2022.2.1f1):
Fixed in: 2022.2.1f1
Resolution Note (2022.1.X):
Port canceled as we transition to 2022.2 (2022.2.X port is active or already resolved)
Resolution Note (fix version 2021.3.15f1):
Fixed in: 2021.3.15f1
Resolution Note (2020.3.X):
No UI Toolkit support for 2020.x