Unity Worldspace Canvas button rarely receiving clicks on mobile (works fine on desktop)

Using Unity 2022.2.1f1, Needle Exporter 2.58.2-pre1
Try this on mobile Android Chrome/ IOS Safari
Press the swap model button and see it doesn’t press really, if you spam press it, it eventually presses
https://lydian-goldenrod-monday.glitch.me/

Original Post on Discord

by user 103054507105067008

Do you have raycast target enabled on the text?

Disabled raycast on the text for sure

by user 103054507105067008

Ok - for debugging: Waking up ・゚✧

The button works flawlessly with the debugbutton&console url but not the original url I posted, what’s up there?

by user 103054507105067008

Well, it did and now it crashes

by user 103054507105067008

Source project zip, tested on Xperia 1 Android Chrome, Windows 11 Chrome, iPhone 6 Safarihttps://drive.google.com/file/d/1EmdDbJZr31NNnRiEoA174ynroRIXnw5h/view?usp=share_link

by user 103054507105067008

I’m heading off for the day now but hoping to get to the bottom of this monday, I’ll just delete the text object if needed just so it works but I’m not sure what’s going on

by user 103054507105067008

This sounds like an issue I had a while ago where the button would work fine in a browser but not in VR. The issue was that other elements in the button were getting the click (i.e. the text element instead of the background) . The solution was to prevent the button text from getting clicks but i can’t recall the details

Looking back through the forum posts and I had to remove the raycastTarget from everything but the active part of the button.

by user 563549194137239552

I disabled raycast target already so must be something else or that property on the Text component isn’t exporting

by user 103054507105067008

Ok ill have a look, thanks for the project :slightly_smiling_face:

Thanks, please do let me know if you have any findings!

by user 103054507105067008

I can confirm the text object doesn’t cause it as I deleted the text object, the button only presses on mobile if you long press it then release after which is weird

by user 103054507105067008

Was caused by doubled up touch events, should be fixed in a new Needle version

by user 103054507105067008