Search Issue Tracker
Fixed in 2022.2.X
Votes
0
Found in
2020.3
2020.3.19f1
2021.2
2022.1
Issue ID
1371833
Regression
No
NullReferenceException is thrown in Play mode when GO Properties window is open and the GO has certain Canvas Components
Reproduction steps:
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)
Notes:
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
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 2022.2):
Fixed in: 2022.2.0a3