How to assign Control Scheme and Pairwith Device after instantiate?

Hello,

I know that you can assign the controlScheme and pairWithDevice in the instantiate like this:

PlayerInput.Instantiate(playerPrefab, controlScheme: "p1", pairWithDevice: Keyboard.current)

However my question is how to do it after the instantiation.

GameObject player=PlayerInput.Instantiate(playerPrefab, controlScheme: "p1", pairWithDevice: Keyboard.current)

player.controlScheme ???
player.pairWithDevice ????

Is this possible?
I’m new with this player input, sorry if this was already asked.

Thanks in advance,

Regards,

player.SwitchCurrentControlScheme("Keyboard", keyboard.current);

To tweak device pairing separate from control schemes, you can also grab the player’s InputUser available from PlayerInput.user (that’s the piece that actually keeps the majority of a player’s state).

1 Like

Great!

Thanks a lot!