[Q] Local multiplayer WITHOUT using PlayerInput

EDIT 3:
Reading here
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/UserManagement.html
it looks like both controller and user management is similar to how Xbox One handle users.

Base on my previous experience I must assign a controller/actionmap to an user.
My game support single player or local multiplayer (max 2 user).

What I can’t understand is how to actualluy do that.

EDIT 2:
The simple multiplayer demo gave me more confusion.
I don’t really need multiple player but I want player1 to control (this is an example) the camera and player2 to control movement.

EDIT 1:
Doing some test I also found that any connected controller can control the game. How can I enable only controller one for user input?

Hi,
As the title says is possible to configure local multiplayer WITHOUT using PlayerInput?
I can’t find any documentation or example about what are the best practices in this case.

How I’m currently handling input

In Awake

if (controls == null)
    controls = new GameControls();

controls.Gameplay.DoPopAction.performed += context =>
{
};

In Update

moveVect = controls.Gameplay.LeftStickOnly.ReadValue<Vector2>();
lookVect = controls.Gameplay.RightStickOnly.ReadValue<Vector2>();

I came out with the idea of having two object with PlayerInput assigned to it and having my scripts subscribe to one of these object in order to listen for button pressing.

Now my game is never going to have more than two player while the other we are working on is a single player game.

I’m now trying to instantiate the playerinput object but it looks like I’m doing something wrong when it comes to controlscheme and device used (even if I can print the device name).

using UnityEngine;
using UnityEngine.InputSystem;

public class SinglePlayerJoinTest : MonoBehaviour
{
    public GameObject playerPrefab;

    private GameControls controls;


    private void Awake()
    {
        if (controls == null)
            controls = new GameControls();

        controls.Gameplay.DoAction.performed += DoActionInternal;
        controls.Gameplay.DoAction.Enable();
    }

    private void DoActionInternal(InputAction.CallbackContext context)
    {
        InputDevice currentDevice = context.control.device;

        PlayerInput playerInput = playerPrefab.GetComponentInChildren<PlayerInput>();
        InputActionAsset actions = playerInput.actions;
        InputControlScheme controlScheme = actions.controlSchemes[0];
        string controlSchemeName = controlScheme.name;

        Debug.Log("Device: " + currentDevice.name + " ControlScheme: " + controlSchemeName);
    
        PlayerInput.Instantiate(
            playerPrefab,
            playerIndex: 0,
            splitScreenIndex: -1,
            controlScheme: controlSchemeName,
            pairWithDevice: currentDevice
            );
    }
}