Search Issue Tracker
Fixed in 2020.1.X
Votes
0
Found in
2019.1
2019.2.5f1
2020.1
Issue ID
1185124
Regression
No
[iOS] Input System fails to detect gamepad unless application is refocused after initial launch
Reproduction steps:
1. Open the attached "1185124.zip (38.8 KB)" project.
2. Go to Build Settings and Switch Platform to iOS.
3. Go to Player Settings and add "DISABLE_INPUT_FIX" to the Scripting Define Symbols field if it is not added.
4. Connect a Gamepad to an iOS device (Tested with Horipad Ultimate).
5. Build and run this application on an iOS device.
6. Click any button on the gamepad.
Actual behavior:
- The iOS device screen is white and doesn't log anything.
Expected behavior:
- Gamepad button clicks are logged on the device screen.
7. Send the app to the background by pressing the home button.
8. Bring the app back to the foreground.
9. Click any button on the gamepad.
- Gamepad button clicks are logged on the device screen.
Reproduced with:
2019.1.5f1, 2020.1.0a6
iPhone 8+ iOS 12.0 (Horipad Ultimate controller)
Not reproducible with:
VLNQA00147, Razer Razer Phone (Phone), Android 8.1.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540 (Xbox One controller)
Workaround (Adding this code to the Unity project fixes the issue):
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void RunFix()
{
foreach(var joystick in Input.GetJoystickNames())
{
Debug.Log($"Found joystick {joystick}");
}
}
Note:
- Packages brakes down using older Unity versions on the attached project.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Add comment