Search Issue Tracker
Won't Fix
Votes
2
Found in
2020.3.2f1
2021.1.0b12
2021.1.16f1
Issue ID
1358000
Regression
Yes
[UI] UGUI elements cause NullReferenceException in Play mode
Reproduction steps:
1. Open user attached project
2. Open the "SampleScene" scene
3. Expand "Canvas" UI Object in a Hierarchy
4. Move "Panel" UI Object above the "Button" UI Object
5. Enter the Play mode
Expected result: Error doesn't occur in a Console window
Actual result: Error occurs in a Console window
Reproducible with: 2020.3.2f1, 2020.3.19f1, 2021.1.0b12, 2021.1.23f1
Not reproducible with: 2019.4.31f1, 2020.3.1f1, 2021.1.0a1, 2021.1.0b11, 2021.2.0a1, 2021.2.0b14, 2022.1.0a11
Error:
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:1550)
UnityEditor.PropertyEditor.RebuildContentsContainers () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/PropertyEditor.cs:804)
UnityEditor.InspectorWindow.RedrawFromNative () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:144)
Note:
If you can't get this error, try to add a new Panel in Canvas, move Panel into Button or move Button into Panel, and so on
-
oddforms
Jul 26, 2022 12:44
-
smallbit
Nov 04, 2021 07:17
2020.3.21 still persists.
-
Akhil-Raja
Oct 10, 2021 13:36
Also observed this in Unity 2020.3.20f1. Empty scene with a canvas and a few blank panels cause this issue.
-
mattrdell
Sep 26, 2021 13:48
This issue is also happening in version 2020.2.0f1, causing a lot of grief.
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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note (2020.3.X):
Won't fix as the issue is cosmetical in nature as it doesn't have any tangible side-effects and affects only one active Unity stream (2020.3)