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
- SystemInfo.get_graphicsDeviceName() is generating garbage GC Alloc when using Metal graphics API
- Crash on D3D12CommonShader::ApplyGpuProgram when attaching material which samples "_UnityFBInput0" to "Full Screen Pass Renderer Feature" Component
- SpeedTree meshes and objects count differs when comparing the numbers in the Player with the Editor
- Model and Prefab Preview icons are not updated after upgrading associated Materials to URP
- Game view is rendered white when viewing the Editor with HDR display and Post Proccesing is enabled on the Main Camera with 2D URP
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.