InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

CHANGE: Input Action Editor Session, Component Editor, Build/Settings Analytics Support + Refactor (ISX-1546)

Open ekcoh opened this issue 1 year ago • 11 comments

Description

This PR introduces Unity Editor analytics support for getting insight into Input Action editor engagement and usage. Analytics have been designed to enable differentiation between an editor embedded into Project Settings (Project-wide actions) as well as a free-floating asset based editor, but otherwise be comparable. The analytics currently only track engagement on a high-level without being specific about specific user actions. Defined metrics are tracked via associated DASD ticket, see ISX-1546 for reference.

Note that this PR has been marked as a CHANGE instead of NEW since it doesn't introduce new user features.

Changes made

Added new class InputActionsEditorSessionAnalytic acting as a proxy object around InputActionsEditorSessionData to provide abstraction around counting operations to prevent direct access and possible related mistakes in code providing metrics. The purpose of this class is to track and report analytics related to .inputactions asset editor windows.

Added new classes to track editor (Inspector) editor changes for the following components:

  • PlayerInputEditorAnalytic tracking selected changes to configuration of PlayerInput.
  • PlayerInputManagerEditorAnalytic tracking selected changes to configuration of PlayerInputManager.
  • OnScreenStickEditorAnalytic tracking selected changes to configuration of OnScreenStick.
  • VirtualMouseInput tracking selected changes to configuration of VirtualMouseInput

Added new class InputComponentEditorAnalytic tracking statistics of how often an Inspector with the associated component editor is displayed for the following components:

  • PlayerInput
  • PlayerInputManager
  • OnScreenStick
  • OnScreenButton
  • VirtualMouseInput
  • TouchSimulation
  • StandaloneInputModule
  • InputSystemUIInputModule

Added new class InputBuildAnalytic that reports statistics on settings when a project is being built. Currently all InputSettings are being logged, see associated spreadsheet (via internal ticket) for details.

Other changes

  • Modified new analytics code to conditionally utilise UnityEngine.Analytics.IAnalytic.IData when compiled on Unity 2023.2 or later and otherwise use legacy setup for analytics. This is achieved by conditionally defining the new IInputAnalytic to either derive from the new IAnalytic or to define a similar interface. This simplifies test and usage code.
  • Refactored existing analytics collection code and reduced number of allocations by using arrays directly instead of lists.
  • Refactored existing analytics constants into C# constants.
  • Refactored analytics tests based on above changed.
  • Refactored IInputRuntime interface and derived classes NativeInputRuntime and InputTestRuntime.
  • Potentially fixed a bug in NativeInputRuntime since previously did not send analytics unless UNITY_ANALYTICS was defined, but this do not seem to be defined in editor anyway. Any insight into this from reviewers would be useful.
  • Modified existing analytics code (Not introduced in this PR) to conditionally utilise UnityEngine.Analytics.IAnalytic.IData when compiled on Unity 2023.2 or later and otherwise use legacy setup for analytics.
  • Added test cases to cover new editor session analytics.
  • Added hooks to UTIK editor to measure action map, action, binding and control scheme edits in addition to explicit and implicit saves as well as reset.
  • FIX for ISXB-930 (Visualisation components)

Notes

Development guidelines for how to integrate editor analytics and test them are linked form the internal ISX ticket. This PR do not introduce analytics for legacy IMGUI editor. If this is needed additional work is needed to setup corresponding hooks for that editor.

This PR can be reviewed and tested as is but should likely not be merged until verified with help of backend engineers so it doesn't introduce regressions for existing analytics and to verify that new analytics are correct.

Checklist

Before review:

  • [x] Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • FogBugz ticket attached, example ([case %number%](https://issuetracker.unity3d.com/issues/...)).
    • FogBugz is marked as "Resolved" with next release version correctly set.
  • [x] Tests added/changed, if applicable.
    • Functional tests added to CoreTests_Analytics.cs
  • [ ] Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • [ ] Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

ekcoh avatar Dec 18 '23 09:12 ekcoh

One problem with this PR/branch is that I noticed formatter fails on InputAnalytics.cs with issue relating to matching an opening bracket early in the file. Not sure why this is, if someone spots the error that I fail to find it would be very helpful.

ekcoh avatar Dec 21 '23 16:12 ekcoh

Thanks @Pauliusd01 I'll check and follow-up with additional changes

ekcoh avatar Jan 08 '24 12:01 ekcoh

Adding new actions in the input actions window still throws this error (not sure if I was supposed to check yet, checked on #660a74d. Ignore me if I'm checking too early):

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.InputSystem.Editor.Commands+<>c.<AddAction>b__3_0 (UnityEngine.InputSystem.Editor.InputActionsEditorState& state) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Commands/Commands.cs:51)
UnityEngine.InputSystem.Editor.StateContainer.Dispatch (UnityEngine.InputSystem.Editor.Command command) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/StateContainer.cs:35)
UnityEngine.InputSystem.Editor.ViewBase`1[TViewState].Dispatch (UnityEngine.InputSystem.Editor.Command command) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ViewBase.cs:70)
UnityEngine.InputSystem.Editor.ActionsTreeView.AddAction () (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionsTreeView.cs:217)
UnityEngine.InputSystem.Editor.InputActionViewsControlsHolder.CreateNewActionMap (UnityEngine.InputSystem.Editor.InputActionMapsTreeViewItem item) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionViewsControlsHolder.cs:61)
UnityEngine.InputSystem.Editor.ContextMenu+<>c__DisplayClass5_0.<GetContextMenuForActionMapItem>b__1 (UnityEngine.UIElements.DropdownMenuAction _) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ContextMenu.cs:25)
UnityEngine.UIElements.DropdownMenuAction.Execute () (at D:/Gitrepo/unity/Modules/UIElements/Core/DropdownMenu.cs:295)
UnityEditor.UIElements.EditorMenuExtensions+<>c__DisplayClass22_0.<PrepareMenu>b__0 () (at D:/Gitrepo/unity/Editor/Mono/UIElements/EditorMenuExtensions.cs:307)
UnityEngine.UIElements.GenericDropdownMenu+MenuItem.PerformAction () (at D:/Gitrepo/unity/Modules/UIElements/Core/Controls/GenericDropdownMenu.cs:45)
UnityEngine.UIElements.GenericDropdownMenu.ClickItem () (at D:/Gitrepo/unity/Modules/UIElements/Core/Controls/GenericDropdownMenu.cs:567)
UnityEngine.UIElements.GenericDropdownMenu.OnPointerUp (UnityEngine.UIElements.PointerUpEvent evt) (at D:/Gitrepo/unity/Modules/UIElements/Core/Controls/GenericDropdownMenu.cs:619)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventCallback.cs:64)
UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventCallbackRegistry.cs:228)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPathWithCompatibilityEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.EventBase compatibilityEvt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:310)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCachedElementUnderPointerOrPanelRoot (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:538)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:581)
UnityEngine.UIElements.PointerEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/PointerEvents.cs:1180)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/Gitrepo/unity/Modules/UIElements/Core/EventDispatcher.cs:336)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at D:/Gitrepo/unity/Modules/UIElements/Core/EventDispatcher.cs:200)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at D:/Gitrepo/unity/Modules/UIElements/Core/Panel.cs:625)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:506)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:225)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:28)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at D:/Gitrepo/unity/Modules/IMGUI/GUIUtility.cs:206)

Pauliusd01 avatar Jan 10 '24 10:01 Pauliusd01

One problem with this PR/branch is that I noticed formatter fails on InputAnalytics.cs with issue relating to matching an opening bracket early in the file. Not sure why this is, if someone spots the error that I fail to find it would be very helpful.

This have now been addressed/fixed.

ekcoh avatar Jan 10 '24 14:01 ekcoh

Adding new actions in the input actions window still throws this error (not sure if I was supposed to check yet, checked on #660a74d. Ignore me if I'm checking too early):

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.InputSystem.Editor.Commands+<>c.<AddAction>b__3_0 (UnityEngine.InputSystem.Editor.InputActionsEditorState& state) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Commands/Commands.cs:51)
UnityEngine.InputSystem.Editor.StateContainer.Dispatch (UnityEngine.InputSystem.Editor.Command command) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/StateContainer.cs:35)
UnityEngine.InputSystem.Editor.ViewBase`1[TViewState].Dispatch (UnityEngine.InputSystem.Editor.Command command) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ViewBase.cs:70)
UnityEngine.InputSystem.Editor.ActionsTreeView.AddAction () (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionsTreeView.cs:217)
UnityEngine.InputSystem.Editor.InputActionViewsControlsHolder.CreateNewActionMap (UnityEngine.InputSystem.Editor.InputActionMapsTreeViewItem item) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionViewsControlsHolder.cs:61)
UnityEngine.InputSystem.Editor.ContextMenu+<>c__DisplayClass5_0.<GetContextMenuForActionMapItem>b__1 (UnityEngine.UIElements.DropdownMenuAction _) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ContextMenu.cs:25)
UnityEngine.UIElements.DropdownMenuAction.Execute () (at D:/Gitrepo/unity/Modules/UIElements/Core/DropdownMenu.cs:295)
UnityEditor.UIElements.EditorMenuExtensions+<>c__DisplayClass22_0.<PrepareMenu>b__0 () (at D:/Gitrepo/unity/Editor/Mono/UIElements/EditorMenuExtensions.cs:307)
UnityEngine.UIElements.GenericDropdownMenu+MenuItem.PerformAction () (at D:/Gitrepo/unity/Modules/UIElements/Core/Controls/GenericDropdownMenu.cs:45)
UnityEngine.UIElements.GenericDropdownMenu.ClickItem () (at D:/Gitrepo/unity/Modules/UIElements/Core/Controls/GenericDropdownMenu.cs:567)
UnityEngine.UIElements.GenericDropdownMenu.OnPointerUp (UnityEngine.UIElements.PointerUpEvent evt) (at D:/Gitrepo/unity/Modules/UIElements/Core/Controls/GenericDropdownMenu.cs:619)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventCallback.cs:64)
UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventCallbackRegistry.cs:228)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPathWithCompatibilityEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.EventBase compatibilityEvt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:310)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCachedElementUnderPointerOrPanelRoot (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:538)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:581)
UnityEngine.UIElements.PointerEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/PointerEvents.cs:1180)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/Gitrepo/unity/Modules/UIElements/Core/EventDispatcher.cs:336)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at D:/Gitrepo/unity/Modules/UIElements/Core/EventDispatcher.cs:200)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at D:/Gitrepo/unity/Modules/UIElements/Core/Panel.cs:625)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:506)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:225)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:28)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at D:/Gitrepo/unity/Modules/IMGUI/GUIUtility.cs:206)

You are absolutely right it seems, this used to work, so guess I have accidentally reverted it at some point. Will fix and ping you back.

ekcoh avatar Jan 11 '24 12:01 ekcoh

Adding new actions in the input actions window still throws this error (not sure if I was supposed to check yet, checked on #660a74d. Ignore me if I'm checking too early):

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.InputSystem.Editor.Commands+<>c.<AddAction>b__3_0 (UnityEngine.InputSystem.Editor.InputActionsEditorState& state) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Commands/Commands.cs:51)
UnityEngine.InputSystem.Editor.StateContainer.Dispatch (UnityEngine.InputSystem.Editor.Command command) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/StateContainer.cs:35)
UnityEngine.InputSystem.Editor.ViewBase`1[TViewState].Dispatch (UnityEngine.InputSystem.Editor.Command command) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ViewBase.cs:70)
UnityEngine.InputSystem.Editor.ActionsTreeView.AddAction () (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionsTreeView.cs:217)
UnityEngine.InputSystem.Editor.InputActionViewsControlsHolder.CreateNewActionMap (UnityEngine.InputSystem.Editor.InputActionMapsTreeViewItem item) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionViewsControlsHolder.cs:61)
UnityEngine.InputSystem.Editor.ContextMenu+<>c__DisplayClass5_0.<GetContextMenuForActionMapItem>b__1 (UnityEngine.UIElements.DropdownMenuAction _) (at ./Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ContextMenu.cs:25)
UnityEngine.UIElements.DropdownMenuAction.Execute () (at D:/Gitrepo/unity/Modules/UIElements/Core/DropdownMenu.cs:295)
UnityEditor.UIElements.EditorMenuExtensions+<>c__DisplayClass22_0.<PrepareMenu>b__0 () (at D:/Gitrepo/unity/Editor/Mono/UIElements/EditorMenuExtensions.cs:307)
UnityEngine.UIElements.GenericDropdownMenu+MenuItem.PerformAction () (at D:/Gitrepo/unity/Modules/UIElements/Core/Controls/GenericDropdownMenu.cs:45)
UnityEngine.UIElements.GenericDropdownMenu.ClickItem () (at D:/Gitrepo/unity/Modules/UIElements/Core/Controls/GenericDropdownMenu.cs:567)
UnityEngine.UIElements.GenericDropdownMenu.OnPointerUp (UnityEngine.UIElements.PointerUpEvent evt) (at D:/Gitrepo/unity/Modules/UIElements/Core/Controls/GenericDropdownMenu.cs:619)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventCallback.cs:64)
UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventCallbackRegistry.cs:228)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPathWithCompatibilityEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.EventBase compatibilityEvt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:310)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCachedElementUnderPointerOrPanelRoot (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:538)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:581)
UnityEngine.UIElements.PointerEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/Gitrepo/unity/Modules/UIElements/Core/Events/PointerEvents.cs:1180)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/Gitrepo/unity/Modules/UIElements/Core/EventDispatcher.cs:336)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at D:/Gitrepo/unity/Modules/UIElements/Core/EventDispatcher.cs:200)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at D:/Gitrepo/unity/Modules/UIElements/Core/Panel.cs:625)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:506)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:225)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at D:/Gitrepo/unity/Modules/UIElements/Core/UIElementsUtility.cs:28)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at D:/Gitrepo/unity/Modules/IMGUI/GUIUtility.cs:206)

This should now be fixed

ekcoh avatar Jan 11 '24 17:01 ekcoh

NullReferenceException thrown when adding actions/maps to ProjectWideActions and immediately closing the window: https://github.com/Unity-Technologies/InputSystem/assets/54306142/01e26515-d1f9-482f-89ed-451799962011

Pauliusd01 avatar Jan 25 '24 13:01 Pauliusd01

NullReferenceException thrown when adding actions/maps to ProjectWideActions and immediately closing the window: https://github.com/Unity-Technologies/InputSystem/assets/54306142/01e26515-d1f9-482f-89ed-451799962011

Thanks for finding this. Its due to a bug in Unity SettingsProvider calls exposing a null-reference situation that should never happen. I have added a null check to avoid it so should be "fixed" now.

ekcoh avatar Jan 29 '24 09:01 ekcoh

LGTM. Mainly only tested for any broken functionality in custom input action assets, projectwideactions, few sample scenes

Good to hear. Pulling this back into work-in-progress since I am adding additional analytics into the mix after recent decisions to also track workflows.

ekcoh avatar Jan 30 '24 17:01 ekcoh

Have found incorrect behavior w.r.t project setting editor that I am trying to figure out, will transition this out of work in progress once that is done.

ekcoh avatar Jun 26 '24 15:06 ekcoh

All associated events have been verified to be received in backend.

ekcoh avatar Jun 28 '24 15:06 ekcoh