Hello,
my game was using UI Toolkit in 2023.2.7f1 and it worked fine.
Now I updated to 2023.2.17f1 and got the error.
Is there someone experienced the issue?
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.BaseVerticalCollectionView.Apply (UnityEngine.UIElements.KeyboardNavigationOperation op, UnityEngine.UIElements.EventBase sourceEvent) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.KeyboardNavigationManipulator.Invoke (UnityEngine.UIElements.KeyboardNavigationOperation operation, UnityEngine.UIElements.EventBase evt) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.KeyboardNavigationManipulator.OnNavigationSubmit (UnityEngine.UIElements.NavigationSubmitEvent evt) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEvent_BubbleUpCallbacks (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement element) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPath (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToFocusedElementOrPanelRoot (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.NavigationEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.PanelEventHandler.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.EventSystems.BaseEventData sourceEventData) (at ./Library/PackageCache/com.unity.ugui@2.0.0/Runtime/UGUI/EventSystem/UIElements/PanelEventHandler.cs:271)
UnityEngine.UIElements.PanelEventHandler.OnSubmit (UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@2.0.0/Runtime/UGUI/EventSystem/UIElements/PanelEventHandler.cs:211)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.ISubmitHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@2.0.0/Runtime/UGUI/EventSystem/ExecuteEvents.cs:134)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at ./Library/PackageCache/com.unity.ugui@2.0.0/Runtime/UGUI/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@2.0.0/Runtime/UGUI/EventSystem/EventSystem.cs:530)
The error was printed when a GameObject with UI Document and a tiny logic script.
I suspected my logic script was doing some bad, so I commented out all the logic inside it.
The UI Document is also tiny. It has VisualElement at the top, a Label inside it.
Another GameObject has Event System and Input System UI Input Module.
I tried removing the two components from the GameObject.
Nothing changed.
I added again the two components Event System and Input System UI Input Module, this time newly created by Add Component button.
Nothing changed.