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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.