Mouse Clicks not working in Samsung DeX (desktop experience)

I have a game that runs fine on Android.

My smartphone (Galaxy S10e) also supports Samsung DeX, i.e., the device switches to desktop mode when connected to an external screen.
Combined with mouse and keyboard (either via bluetooth or USB hub), this enables a desktop experience running on a mobile device.

Sadly, mouse clicks do not work on UIToolkit buttons when using DeX.
The mouse pointer correctly triggers USS styles (hover, press, etc.) but no Action is triggered when clicking a button.

However, it works without DeX. When the phone is NOT connected to an external screen and only to a mouse then buttons work as expected (mouse clicks work in this case).

Thus, the issue seems to be related to Samsung DeX.

I noticed that the input system seems to change (I am using “com.unity.inputsystem”: “1.3.0”).
When using the mouse with DeX, it seems to be “touch input” (Touch.activeTouches).
In contrast, when no using DeX, then the mouse does not seem to be considered as “touch input”.

Questions:

  • Anyone else tried Samsung DeX with UIToolkit?
  • Has there been any official support for DeX from Unity side (in uGUI)?
  • Should I open a bug report?

Unity 2021.3.4f1

I assume you can click in the regular de environment normally.
If so, do make a bug report for it with the project attached.
First make sure the issue isn’t happening in the latest LTS (or tech stream) you can use

I created a sample project to reproduce the issue.
The issue only occurred after I added the new InputSystem (“com.unity.inputsystem”: “1.3.0”) and an EventSystem and InputSystemUIInputModule to the scene.

Without InputSystemUIInputModule, I think Unity uses the old InputSystem, which does not seem to have this issue.

Tested with Unity 2021.3.4f1

Anyway, I created a bug report for this (CASE IN-17162).

EDIT: Unity confirmed the bug

The issue changed in latest 2022.1.16f1

Button clicks in Samsung DeX seem to work in the beginning with Unity 2022.1.16f1 and “com.unity.inputsystem”: “1.4.2”.

But after few seconds, the app seems to slow down dramatically. There are large delays between clicking / moving the mouse and seeing the result (i.e. button gets hover style). After few clicks, the app is unusable.
However, this seems to be the case regardless of the EventSystem.

So I guess Unity might have fixed my original bug.
Sadly, the new InputSystem on DeX is still unusable due to some performance issue as it seems.

This issue has been fixed. Tested with Unity 2022.3.6f1