- Home /
Multiple x360 controllers get wrong IDs assigned.
I have a problem with multiple controllers. It's incredibly annoying and the problem seems to be with Unity.
I'm working on controls for a local multiplayer version of our game, it uses 4 xbox controllers. When I fire up the controllers they all get their IDs from 1 to 4. When I start up the game and try to remap the controllers in the Unity launcher, it shows me that the 4 controllers have seemingly random IDs, they make no sense at all. Unity will tell me that the controller which has the #1 light burning is actually #4 or another random number between 1 and 4.
I verified the controllers in other games and those games do seem to understand the IDs that the controllers give themselves. It's just that Unity doesn't seem to care about the IDs which the controllers assign to themselves and assigns them random IDs.
Is there any known fix?
Answer by Jessy · Dec 27, 2013 at 12:37 PM
There may be a known fix, but if so, it's only known to Unity's developers and isn't available. Bugs have been reported with the totally-insufficient-for-multiplayer input system, and it is being redesigned, but there's no ETA.
This response does not take plugins into account; go check out the Asset Store first.
I have used XInput for previous projects but I need a cross platform solution for this one. I will browse through the store some more but I would prefer this to be fixed on Unity's side too. To be honest the current state of the input system is unacceptable, it just doesn't work.
Answer by tanoshimi · Dec 27, 2013 at 12:47 PM
Yeah, I get the same problem. It seems ok if I connect all four controllers before firing up Unity, but any new controllers connected once the editor is loaded seem to be mapped to a fairly arbitrary input - which certainly doesn't always correlate to the quadrant lit on the joypad front.
It took me a while to realise this was a Unity "feature", and therefore I needlessly scrapped and recreated my input settings several times wrongly believing that was the problem :(