Local Mutliplayer UI

Hello! I’m attempting to make a local multiplayer game with the new unity Input system. I’m fairly new to coding and Unity. I’m trying to make a UI join screen where players can join and then select their character (kinda like the castle crashers player select screen) . Each UI panel has a separate instance of a controller script and a Player Input component with reference the same action map. The controls perform the desired actions on the UI but the problem is each controller controls all the player selection player panels. Sorry if this was unclear. Any assistance on how assign each gamepad to an individual panel would be very helpful. Thanks.

This is my code In the controller script:

PlayerInput controls;

    private void Awake()
    {
        controls = new PlayerInput();

        controls.UI.Join.performed += context => JoinPlayerAction();
        controls.UI.Confirm.performed += context => ConfirmAction();
        controls.UI.Back.performed += context => BackAction();

        controls.UI.Navigate.performed += context => Navigate(context.ReadValue<Vector2>());
    }

You can restrict an individual player to a subset of the UI using MultiplayerEventSystem.

Instead of using “Generate C# Class” with the .inputactions, I would however recommend using the PlayerInput component that comes with the input system. It has built-in support for multiple players and through its uiInputModule property, can also automatically synchronize UI actions.

1 Like

Does Auto-navigate (or whatever it was called) work with MultiplayerEventSystem yet or does it still require that we set up links manually?