KeepCool
KeepCool

Reputation: 565

Touch is not working with Unity UI Toolkit buttons

I'm having a weird issue, may be a simple fix.

I've got a UI only "game" using the new UI Toolkit. It's a little kind of a drawing program. I've got a draw area in the middle with "tool buttons" on the sides. Everything works fine with Mouse, Pen, and touch when drawing (using scripts I can access all types of pointers), but for some reason touch doesn't work with the UI buttons only.

What's even weirder is that touch on UI buttons works when testing directly in Unity Play mode (I've got a touch screen laptop), but doesn't work when I make a Build.

In my Project Settings -> Input System Package, I've got Pen, Mouse, and Touchscreen active under "Supported Devices"

The new UI Toolkit is so new there's no help or similar issues I can find online.

Upvotes: 0

Views: 2921

Answers (3)

KeepCool
KeepCool

Reputation: 565

Just a follow up since I ended up finding my answer somewhere else.

In the "Input System UI Input Module" component in the EventSystem, I changed the "pointer Behavior" to "Single Unified Pointer" and that fixed it. Not sure if that's just a work-around, but it works great now.

Upvotes: 0

Garrod Ran
Garrod Ran

Reputation: 328

I add the touch screen here and it works now. enter image description here

Upvotes: 0

beans
beans

Reputation: 11

if its still relevant: I had the same issue and used "Standalone Input Module" instead of "Input System UI Input Module" in EventSystem. It says it's the old option, but it works for me :D

Upvotes: 1

Related Questions