Search Issue Tracker
Won't Fix
Votes
1
Found in
3.4.0f5
Issue ID
414945
Regression
No
Inconsistent behavior when using multiple joysticks
This issue has no description.
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Kiritsugu
Dec 30, 2013 20:00
The documentation here:
http://docs.unity3d.com/Documentation/ScriptReference/Input.GetJoystickNames.html
says that GetJoystickNames can be used to give descriptive names for gamepads instead of "Joystick 1", etc.
But (at least on Windows, where I've tested), there is no way to link a joystick's number for purposes of calls to Input.GetKey (Like Input.GetKey("joystick 1 button 5")) and setting up axes with its name's index in GetJoystickNames.
Because unplugging and replugging joysticks changes their number, and, their number can quickly become one that you don't have axes set up for, meaning you can't use the joystick.
There is no way to maintain a player's logical connection to a joystick across potential joystick unplugs/replugs.
What we need is for newly plugged-in gamepads to take the lowest unused joystick numbers instead of climbing progressively higher into as they are repeatedly unplugged/replugged. We need is something like:
static int[] Input.GetJoystickNumbers ();
which returns an array of numbers for joysticks that can be used by Input.GetKey for currently plugged in joysticks, where an index in this function's return value is for a joystick whose name is at the same index in the return value of Input.GetJoystickNames