If I switch control scheme directly like this, the PlayerInput update correctly :
playerInput.SwitchCurrentControlScheme(Keyboard.current, Mouse.current);
But if I listen to InputSystem.onAnyButtonPress to get the InputDevice with a keyboard device, the PlayerInput doesn’t change its device and control scheme:
OnAnyButtonPressed += device =>
{
playerInput.SwitchCurrentControlScheme(device);
}
Listening for multiple different Gamepads with OnAnyButtonPressed will correctly update the PlayerInput. But here, when the event comes from a keyboard, it doesn’t update and the PlayerInput stays at its last devices and control schemes . Why is it the case?
Thank you for any help!