Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Input Manager gets confused if a gamepad reconnects

Discussion in 'Editor & General Support' started by Domarius, May 25, 2020.

  1. Domarius


    Jan 5, 2013
    I'm enabling an option in my game to use the legacy Input Manager instead of the new Input System, if the user has more than 4 Xbox controllers (since the new Input System doesn't support this). I found a reproducible problem with Input Manager and more than 4 Xbox controllers, and have attached a minimum viable project to demonstrate the issue.

    Everything works fine if you connect more than 4 (say, 5) xbox controllers one after the other. However, if you disconnect and then reconnect just one of them, one of the other gamepads will "rob" its input and act as if it's both, and the reconnected controller does nothing. This persists after closing and restarting Unity editor or your stand alone game. You can see this in the editor in the attached project, by moving the left thumbstick left or right on each controller.

    But you can fix this problem by disconnecting all the controllers, and reconnecting them one after the other again. This even fixes the problem without restarting your game.

    Is this the only workaround? Is my only option to just warn my users of this potential situation? I've submitted this as a bug report, but just posting here in case anyone knows of a better way to handle this situation.

    UPDATE: Reconnecting all gamepads doesn't fix the issue in the final build, only in the editor... couldn't not work around this bug in the stand alone build of the game :(

    Attached Files:

    Last edited: May 25, 2020