Search Issue Tracker
By Design
By Design in 1.14.X
Votes
0
Found in [Package]
1.14.0
Issue ID
ISXB-1507
Regression
Yes
Control Scheme does not change when simulating touch input
How to reproduce:
1. Open the “IN-98935_InputSystemTest“ project
2. Open the “SampleScene“
3. Select Windows → Analysis → Input Debugger → Options → Simulate Touch Input From Moue or Pen
4. Enter Play Mode and use the keyboard
5. In the Input Debugger, observe the Control Scheme at Users(1) → User #0
6. Click on the Game View with a mouse and observe the Control Scheme
Expected result: Control Scheme changes from “Keyboard&Mouse” to “Gamepad“
Actual result: The control Scheme remains “Keyboard&Mouse“
Reproducible with: 1.12.0 (6000.0.46f1), 1.14.0 (2021.3.50f1, 2022.3.61f1, 6000.0.46f1, 6000.1.0b14, 6000.2.0a8)
Not reproducible with: 1.11.2 (6000.0.46f1)
Reproducible on: Windows 10
Not reproducible on: No other environment tested
Notes: Sometimes the Control Scheme might be stuck at Gamepad (part of the issue)
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
- "No GUI Implemented" is displayed when using PhysicsMask with a CustomEditor
- "Report is from another project" popup warning is shown on domain reload when Project Auditor was previously ran in a different project
- Addressables Analyzer flags duplicate resource references from ScriptableObjects incorrectly when the corresponding field has been removed
- "IndexOutOfRangeException" and "NullReferenceException" are thrown and Element disappears from UI Builder when undoing rename of element in "Open Instance in Context" menu
- Select Scriptable Object window freezes and becomes unresponsive when currently opened UXML Template is selected for binding's Data Source
Resolution Note:
Based on the report, we're closing this as by design, but feel free to reopen if our assessment is incorrect.
The PR https://github.com/Unity-Technologies/InputSystem/pull/2023 introduced a fix to prevent constant switches between OnScreenControl devices and Pointer devices that interact with it.
Which means that only when the OnScreenControl device has any input event queued (through SendValueToControl(), for example), the control scheme will be switched. So you need to make sure your logic in UltimateTouchpad.cs deals with this, particularly in OnPointerDown/Up events. Those UI events are responsible for queuing input events which will change the active control scheme of PlayerInput.
Feel free to look at the implementations of OnScreenStick and OnScreenButton, and the OnScreenControlsSample that can be downloaded from the Package Manager > Input System package view.
Resolution Note (1.14.X):
Based on the report, we're closing this as by design, but feel free to reopen if our assessment is incorrect.
The PR https://github.com/Unity-Technologies/InputSystem/pull/2023 introduced a fix to prevent constant switches between OnScreenControl devices and Pointer devices that interact with it.
Which means that only when the OnScreenControl device has any input event queued (through SendValueToControl(), for example), the control scheme will be switched. So you need to make sure your logic in UltimateTouchpad.cs deals with this, particularly in OnPointerDown/Up events. Those UI events are responsible for queuing input events which will change the active control scheme of PlayerInput.
Feel free to look at the implementations of OnScreenStick and OnScreenButton, and the OnScreenControlsSample that can be downloaded from the Package Manager > Input System package view.