Log in or register to post comments

Pressing Unity UI Buttons triggers touch event

April 11, 2018 - 9:38am #1

I was wondering if anyone can help me.

I have a simple Vuforia project with an ARcamera, Plane finder (using Deploy Stage Once) and Ground Plane Stage. To spawn one simple cube. Then I created a Unity UI button to toggle a bool I made to lock the cube/skipping OnInteractiveHitTest inside the Deploy Stage Once script. When I built and tested the project, the cube moves around the reticle just as intended when pressing on an empty space. However when I press on the UI button it triggers the phone's touch event first before doing what the button does. Resulting in the cube moving before it locks in place.

But when I look at the example app from Vuforia ground plane project example the 4 buttons on the bottom right works without triggering the phone's touch event.

I've searched all over to try find the solution or a fix to this, but it all been unsuccessful. Am I missing something? Please help.

Pressing Unity UI Buttons triggers touch event

April 12, 2018 - 2:38am #3

I'm not sure what happened. But I went back on the project today, tried making  UI toggle image button instead, built and everything is working how it's meant to work.

Even the normal button that I was confused about yesterday works too (without triggering a touch event).

 

Thank you for your time dpizzle.

Pressing Unity UI Buttons triggers touch event

April 11, 2018 - 2:23pm #2
Log in or register to post comments