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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Unity won't detect more than 4 Xbox One Controllers?

Discussion in 'Input System' started by albrechtjess, May 9, 2020.

  1. albrechtjess

    albrechtjess

    Joined:
    Oct 11, 2017
    Posts:
    11
    Not sure if this is native to Unity or the Input System but when I use a wireless adapter or USB's to plug in Xbox one controllers, the new input system only detects 4 of them in the Input Debugger and I can't join anymore than 4 players into my game with them. Is this a bug or a limitation? I couldn't find any mentions of limitations for total input devices in the documentation. My game works with 5 players with 4 controllers and a mouse and keyboard but I was designing it for 8. All 8 of my controllers show up in Windows device manager and listed devices. I am using version 1.0.0 of the Input System and Unity 2020.1.0b7. I tried with 2019.3.7f1 but they weren't detected there either.
     
  2. WarmedxMints

    WarmedxMints

    Joined:
    Feb 6, 2017
    Posts:
    1,035
    Xinput only ever supported 4 controller maximum. MS did update that for the xbox one so it can support 8 but I believe unity is using the xinput api to manage xbox controllers.
     
    albrechtjess likes this.
  3. Domarius

    Domarius

    Joined:
    Jan 5, 2013
    Posts:
    99
    I've heard of this limitation. So what about other kinds of controllers, if the user adds 4 Xbox one controllers, will they be able to add additional Xbox 360 controllers? Does wired/wireless matter? What about other USB controllers, can you add more of those after the limit is reached?
     
  4. WarmedxMints

    WarmedxMints

    Joined:
    Feb 6, 2017
    Posts:
    1,035
    XInput covers xb1 and 360 controllers. So any combination of those up to 4 through that api. The input system can handle different controllers though which aren't using the xinput api.

    You could deal with the xbox controllers through directinput. That has issues though as the triggers are one axis so you cannot detect if both are pressed at the same time as you would get a value of 0;
     
    Domarius likes this.
  5. albrechtjess

    albrechtjess

    Joined:
    Oct 11, 2017
    Posts:
    11
    Last I looked into this Xbox One's and Windows supports 8 Xinput controllers now but perhaps this is through a different api that Unity doesn't use for controller input, I'd definitely prefer not to use directinput for that reason.
     
  6. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    339
    Last week end, I had the opportunity to test my game with multiple usb controllers : Xbox One, PS4, and some third party manufacturers.
    I was only able to connect a total of 8 controllers ... I hopped I could connect 10 :/