1
\$\begingroup\$

I'm working on a project where I have a main UI (Screen Space - Overlay canvas) and various game objects that have little popups above them (World Space canvas) that the player should be able to click on. Everything on the main UI works fine, but the OnPointerDown and OnPointerUp methods on the World Space canvases aren't firing when I click on them.

Things I've made sure to check:

  • The canvases have a Graphic Raycaster
  • The canvases have their Event Camera set to the scene's camera
  • The Image on the canvas that's supposed to get clicked on has Raycast Target set to true

This was all working fine in Unity 2018, but in 2019 it's not. Is this a bug, or has something changed that I just don't know about? Either way, is there any way to fix this?

\$\endgroup\$
2
  • \$\begingroup\$ How is your event system configured atm? \$\endgroup\$
    – DMGregory
    Dec 14, 2019 at 23:06
  • \$\begingroup\$ @DMGregory Nothing unusual. imgur.com/a/hnqscGe \$\endgroup\$ Dec 15, 2019 at 0:11

1 Answer 1

1
\$\begingroup\$

For anyone still having this in 2023:

There is likely some component that's already consuming the OnPointerDown() event before it reaches your script. Check if there are other components in the hierarchy that have IPointerDownHandler or IPointerUpHandler.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .