Search Issue Tracker
Fixed in 2022.2.X
NullReferenceException is thrown in Play mode when GO Properties window is open and the GO has certain Canvas Components
1. Open the attached project ("1371833_22.1.0a16.zip")
2. Open "SampleScene"
3. Right-click Canvas in the Hierarchy window and select "Properties..."
4. Enter Play mode
Expected result: There are no errors in the Console window
Actual result: NullReferenceException is thrown:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.PropertyEditor.DrawEditors (UnityEditor.Editor editors) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/PropertyEditor.cs:1722)
UnityEditor.PropertyEditor.RebuildContentsContainers () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/PropertyEditor.cs:916)
UnityEditor.InspectorWindow.RedrawFromNative () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:175)
Reproducible with: 2020.3.23f1, 2021.2.4f1, 2022.1.0a16
Couldn't reproduce with: 2019.4.33f1 (no Properties window)
1. In 2020.3.23f1 and 2021.2.4f1, the same GameObject or the Parent Canvas also needs to be selected in the Hierarchy window
2. In 2020.3.23f1 and 2021.2.4f1, the issue is not reproducible with Canvas, only GameObjects that have Canvas Renderer and a Component that depends on it
3. In 2022.1.0a16, the issue is reproducible with GameObjects that have a Canvas Renderer or a Canvas Component
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- The Editor does not recognize button release when first releasing the "LShift" button and then "Numpad2"
- Reflection Probe doesn't load until it's selected in the Hierarchy window when the project has been opened
- "ArgumentNullException" error in the Console when selecting certain ScriptableObjects and entering Play Mode
- Configurable joints become bouncier when setting "Bounciness" below 1
- Prefabs get corrupted when editing Particle System curves
Resolution Note (fix version 2022.2):
Fixed in: 2022.2.0a3