Search Unity

Associating Input.GetJoystickNames() with joystick 1, 2, 3...

Discussion in 'Scripting' started by p_025, Sep 21, 2013.

  1. p_025

    p_025

    Joined:
    Apr 6, 2013
    Posts:
    22
    Simply put I'm trying to find out which joystick named in Input.GetJoystickNames() corresponds to which controller identified by "Joystick 1", "Joystick 2", etc. The array returned by Input.GetJoystickNames() simply returns controller names, and changes size when a controller is unplugged, but the controller referred to by "Joystick #" is always the same.

    What I need is a way to figure out which joystick is which. After some Googling I've found some people with the same issue but no solutions. So I hope someone here has an answer.
     
  2. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
  3. p_025

    p_025

    Joined:
    Apr 6, 2013
    Posts:
    22
    Well that's nice, but it's not exactly relevant at all. That project is designed for one type of controller. I'm trying to figure out what controllers the user has connected.

    Also it seems GetJoystickNames() is incredibly unreliable, the results it gives can vary wildly between devices, sometimes even giving something as utterly useless as "Broadcom Bluetooth HID" for an Ouya controller on an Android device. Come on Unity, there must be some other information you can give developers access to.
     
  4. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
    In this case, it's going to be boring.
    Maybe a complete update of the input of the unity 3d, would be nice.
    Multi input support.