1

Good people of SO,

I'm currently working on a game in Unity3D using xbox 360 (wired or not) controllers. I'm searching for some king of "best practice" to achieve Windows and MacOS support for the game.

STEP 1

My first approach was to create a full InputManager.asset mapped for 4 controllers based on :

http://wiki.unity3d.com/index.php/Xbox360Controller http://wiki.etc.cmu.edu/unity3d/index.php/Joystick/Controller (and some other ...)

and use the Input.getAxis().

ISSUE

The main issue I have is when you disconnect and reconnect a controller : the Axis ID changes ... and it's veeeeery hard to find re-assign the controller to the right player instance in the game. The ONLY information that Unity provides me is the Input.GetJoystickNames() to know at any moment how many controllers are connected ... but it's not enought informations to know who is plugged where ...

STEP 2

Then I heard of the XInput dll :

http://forum.unity3d.com/threads/37542-XInput-NET-full-support-for-Xbox-360-Controller-(Windows)

that would have solve everything regarding using the controller...

ISSUE

... but sadly it doesn't work in macOs ...

Any solutions ? Thanks :)

Lego
  • 490
  • 1
  • 6
  • 16
  • That's some crazy setup. It reminds me of the folks who hooked up Wii remotes to a PC through bluetooth. – dadinck Apr 17 '13 at 18:56
  • :( so no one had a response for this? (May I ask what you ended up doing?) – NHDaly Nov 20 '13 at 19:06
  • Unity hasn't updated the way they handle joystick ids on plug/unplug yet. Based on what you want to do you could check this : https://github.com/pbhogan/InControl – Lego Jan 15 '14 at 17:51

0 Answers0