Unity, How to get specific controller input with multiple controller(joysticks)

213 views Asked by At

enter image description here

I found to get how many controllers connected.

But how do we know each different controller's input?

Example: Assumption: 1st Player - Keybord and Mouse, 2nd Player - 1_Xbox Controller, 3rd Player - 2_Xbox Controller What I want: Get 2nd Player and 3rd Player controller's input using for statement

for(int i =0; i<3; ++i)
{
    Inputdata data;
    if(i == 0)
        data = GetKeyboardMouseInput();
    else
        data = GetControllerInput(i);
}

like this way

Get Inputdata with each different controller's input?

  • I am not using New Input System
0

There are 0 answers