Search Issue Tracker

By Design

Votes

0

Found in [Package]

1.16.0

Issue ID

ISXB-1765

Regression

Yes

Simulation Touch with the New Input System does not work compared to older versions

Package: Input System

-

How to reproduce:

  1. Open the “2494927.zip“ project
  2. Open the “SampleScene“
  3. Open Window → Analysis → Input Debugger
  4. Enable Options → “Simulate Touch Input from Mouse or Pen”
  5. Enter Play Mode
  6. Click the Button
  7. Observe the Console

Expected result: Logs about recurring simulated clicks are logged
Actual result: Nothing is logged

Reproducible in: 1.14.1, 1.16.0 (6000.0.62f1, 6000.2.13f1, 6000.3.0f1, 6000.4.0a5, 6000.5.0a1)
Not reproducible in: 1.14.0 (6000.0.62f1, 6000.2.13f1, 6000.3.0f1, 6000.4.0a5, 6000.5.0a1)

Reproduced on: Windows 11 Pro (24H2)
Not reproduced on: No other environment tested

  1. Resolution Note:

    Question 1, if the user wants to simulate Touchscreen interaction, they don't need to enable "Simulated Touch Input from Mouse And Pen". That's just if the user wants to indeed use a Mouse and Pen to simulate Touchscreen interactions. What this is mode does is that it disables Mouse and Pen devices (so they won't receive Mouse events) and "routes" them through the Simulated Touchscreen device. The class TouchSimulation in the Input System package contains more information about the implementation.

    Question 2: The fact that this worked in 1.14.0 was due to a regression for fixing another bug. The side effect allowed the user to do what they wanted. 1.13 doesn't allow it for example. Technically, the behavior regressed in 1.14.0 and was fixed in 1.14.1

    Question 3: If the option is "Simulate Touchscreen with Mouse and Pen" then yes. Again, this option is to interact with the Mouse/Pen. There's nothing preventing users to at their own devices and queue input state events at runtime. However, they should have understood that there's an impact on both UIInputModule and PlayerInput components in the Event System. For instance, if the user is using PlayerInput components, it's wise to add the respective devices to the control schemes of the Input Actions Asset. In the example, only the Keyboard & Mouse are set, which will not work as expected when using a Touchscreen. The Touchscreen device needs to be added to the control scheme; otherwise, it won't work as the user likely wants. I'd suggest looking at the default project-wide actions to understand more about the UI action and its control schemes.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.