Search Issue Tracker
Fixed in 2021.3.21f1
Fixed in 2021.3.X, 2022.2.X, 2023.1.X, 2023.1.0a22
Votes
1
Found in
2021.3.14f1
2022.1.23f1
2023.1.0a18
Issue ID
UUM-19168
Regression
No
[Forma Render] NullReferenceException in UnityEngine.UIElements.PanelRaycaster.Raycast during runtime
Reproduction steps:
1. Open the “Validation“ project
2. Enter the Play Mode
3. Observe the Console
Expected result: no NullReferenceException
Actual result: a NullReferenceException
Reproduced in: 2021.3.14f1, 2022.1.23f1
Could not test in: 2020.3.42f1, 2022.2.0b14, 2023.1.0a19 (project issues after downgrade/upgrade)
Reproduced using: macOS Monterey 12.0.1 (Intel), Windows 10
Notes:
- The reporter also reproduced in 2023.1
- Sometimes the error does not occur
- Could not test a Player due to UI failing to load in it
Full error:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.PanelRaycaster.Raycast (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] resultAppendList) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/UIElements/PanelRaycaster.cs:108)
UnityEngine.EventSystems.EventSystem.RaycastAll (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] raycastResults) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:263)
UnityEngine.EventSystems.PointerInputModule.GetMousePointerEventData (System.Int32 id) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/PointerInputModule.cs:295)
UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:540)
UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:526)
UnityEngine.EventSystems.StandaloneInputModule.Process () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:280)
UnityEngine.EventSystems.EventSystem.Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)
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
- Uninitialized variable warning appears in the Inspector of a custom shader when the variable is initialized
- "Failed creating toolbar element from ID..." error is thrown when resetting the Scene view Overlay layout while an Asset Transformer Toolbox overlay is active
- Entity ID for Font Assets is serialized twice which throws an error when using Debug Inspector
- Play Mode can be entered when disabling Adaptive Performance and pressing either the Play Mode button or the keyboard shortcut to enter Play Mode before recompilation leading to errors and warnings thrown
- Parent ListView element also becomes selected when inner ListView element is selected
Resolution Note (fix version 2022.2):
Fixed in 2022.2.21f1
Resolution Note (fix version 2021.3):
Fixed in 2021.3.21f1