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>());
}