I have a game that is local coop where I'd like the players to be able to use both their own controller and a shared keyboard. So player 1 can use their joystick to move OR the arrow keys, and player 2 can use their joystick OR wasd.
So basically, I want a prefab to have two devices assigned to it. A specific joystick and the keyboard.
----------
So far I use the following to create a player:
PlayerInput.Instantiate(player1Object, controlScheme: "normal", pairWithDevice: Gamepad.all[0]);
----------
This assigns the correct controller to the prefab but does not allow them to use the keyboard. How can I also assign the keyboard to them?
↧