Disabling and re-enabling an action stops taking input from the keyboard
I found that calling Disable() and Enable() on an action stops taking keyboard input for that action (other actions still work correctly).
For example, I have an action Inventory.Open hooked to E on the keyboard and a joystick button. When the player pauses the game, I call Inventory.Open.Disable(), which blocks the input completely. I then call Inventory.Open.Enable(), which should restore the Action back to its enabled state, but now only the joystick input is accepted, and pressing E does nothing.
I have also verified this for a Vector2 Action (movement) bound to a joystick and composite WASD: after a Disable() and Enable(), only the joystick works, and WASD stops responding.
Pause.InventoryLock.OnLocked += controls.Inventory.Open.Disable;
Pause.InventoryLock.OnLocked += DisableHotbar;
Pause.InventoryLock.OnUnlocked += controls.Inventory.Open.Enable;
Pause.InventoryLock.OnUnlocked += EnableHotbar;
Simple code example, I bind the Enable and Disable methods to events.
I'm 98% certain this is the same bug as #538. Feel free to add your vote here: https://issuetracker.unity3d.com/issues/scripting-input-action-fails-to-re-enable-after-disabled, so our dev can prioritize bug fixing. Thanks!
Closing for this bug is filed.