Unity Ui Button ignored when on tracked object


#1

Canvas buttons work fine when separate - but if a world canvas is attached to a zappar image tracker object, the buttons attached to it don’t allow any interaction.

Am i the only one to get this ? I wonder what the solution is.

building on Unity 2019.4.3 LTS and testing on android 11 pixel phone.


#2

Hello @kingbaggot,

I wonder if you’ve defined the event camera for world space canvas? Sometimes that may cause this issue! Couple of other things to check would be:

  • Unity event system object is present and active in scene
  • uncheck “Ignore Reversed Graphics” in Graphic Raycaster
  • make sure there’s no other object in scene that is masking

If the issue still persists please do share a minimum repro project that we can test on our end.

Best,


#3

thanks for the reploy Shubham - everything checks out ok, and except that last point about masking.

The ui button in question were on a masked ui object - which in a regular webgl build are still interractable. But not in the zapbox build.

Is this something I’m going to need to work around then ? I’ll do a couple more tests in the meantime.


#4

ha - there was a box collider in the mix that was blocking raycast - even though it was disabled.
fixed then, thanks for your help S