Four Gamepads, Four Player Objects

I am developing an arcade game in Unity that uses four displays, four gamepads, and four menus.

I was using the old input system just fine, until I hit the roadblock of not being able to have a separate menu on each of my four displays. I decided at this point to migrate to the new Unity Input System.

I am having trouble figuring out how to set each gamepad to correspond to each screen. These will control both the pre-game UI as well as each player. Since my game will always have the same four static gamepads always connected, I figured this wouldn’t be too hard to solve.

My current setup is that I have four Player Input Components, on four different screens, all being controlled by one generic set of player controls (Input Action Asset).

I feel like I don’t need the ability to opt-in or auto-join controllers since they are always on (No need to instantiate a prefab based on controllers joining).

No matter what gamepad I use, they all control all four screens. I am hoping to find a way to tie a Player Input Component to a specific gamepad, is this at all possible?

To use split screen, you’d want to do the following to each player game object that has the Player Input component:

  • Add a Camera

  • Make your menu a prefab and add an instance of the prefab to each player

  • Add the Multiplayer Event System component and assign the UI root game object as the root (this will keep the players controller controlling only that UI)

  • Setup the Player Input Manager component on the scene and enable the split screen option. Since players are always joined, you can disable the auto join and set the screen split and player counts

Not sure this is the best route, but it’s the one i found that works given there is little to no documentation about it.

1 Like