Search Issue Tracker
By Design
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
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
- "Assertion failed on expression" error occurs when multiple Animation Components are instantiated after changing the Culling Type
- MacOS persistentDataPath uses old path when built compared to Editor Play mode
- Crash on RaiseException when entering Play Mode in a specific project
- Debug Console does not reappear when disabling and re-enabling Debug.developerConsoleEnabled
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.