- Home /
Xbox One controller on iOS spams GetKeyUp and GetKeyDown every frame while a button is pressed
The issue is similar to https://issuetracker.unity3d.com/is...own-any-key-on-wireless-tv-remote-or-keyboard but it's happening on iOS ever since they added support for additional buttons for controllers on iOS in 2019.2.18. I filed a bug report months ago (1218784 on FogBugz) and the person responding only had a PS4 controller to test on and couldn't repro with that.
Here's the report I filed:
What happened:
Xbox One S Bluetooth controller on iOS spams GetKeyUp and GetKeyDown every frame while a button is pressed, making it unusable. This started happening after update 2019.2.18f1, only on iOS. Android is working as intended. Custom Input names stopped working as well via OnButtonDown (also iOS only), and inputs don't work at all without specifying the joystick number.
How we can reproduce it using the example you attached Build the attached project for iOS, run it on a device with an Xbox controller connected via Bluetooth, launch the app via Xcode, observe the console as you press keys on the controller.
Expected behavior:
OnKeyUp and OnKeyDown are only called on the frame where those actions happen
OnButtonDown should let you call custom named input axes/buttons
KeyCode.JoystickButton14 is called together with KeyCode.Joystick1Button14 if the controller A button is pressed.
These would be reflected in the console, as can be seen in the attached script.
What actually happens on iOS:
OnKeyUp and OnKeyDown are called every frame while the key is held down
OnButtonDown is not called at all
Only KeyCode.Joystick1Button14 is called, not KeyCode.JoystickButton14
All three of these issues can be seen in the attached project’s script console output in Xcode while running on device.
Link to repro project: https://mega.nz/file/Eo0FlDab#SCGOca-ZVQjO9xxjmKzXd89yd9VskTGnHn6P7TUIjQ0
This is still happening to me as of 2019.3.7. Anyone else have this bug?
Your answer
Follow this Question
Related Questions
Unable to create ios build 0 Answers
Can't build for iOS 0 Answers
Editing Skinned Cloth Verticies is faulty 0 Answers
Windows toolbar showing in fullscreen mode 1 Answer
Script only works if i enable/disable it in inspector 0 Answers