Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

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:
    20
    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:
    670
  3. p_025

    p_025

    Joined:
    Apr 6, 2013
    Posts:
    20
    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:
    670
    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.