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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment