InputSystem
InputSystem copied to clipboard
Handling InputActionAsset in InputActionTrace
Description
If binding resolution triggers (due to adding new device, etc) when InputActionTrace is used on InputAction from InputActionAsset, we fail with debug exception that the provided object in onActionChange is unexpected.
Because in this case onActionChange is invoked with InputActionAsset object and not InputAction or InputActionMap, which is not handled by InputActionTrace.
Changes made
- Added branch in
InputActionTraceto handleInputActionAsset, and clone all relevant states from the asset. - Modified the test to trigger the branch.
Notes
I don't know why we have m_ActionMapStateClones, they don't seem to be used? Are they needed because InputAction indirectly uses memory from them?