Prevent event (click) propagation on a button

Hi there,

I have a canvas with one button, which has OnClick() function. The canvas is above some of my other objects and it uses Screen Space - overlay rendering mode.

When I click on the button, OnClick() is executed, yet the elements beneath the button also get clicked.

Any ideas how to prevent this?

Thanks!

Please read the FAQ.

Thanks superpig!

1 Like

@superpig is there an updated 2019 answer to this?

Not to my knowledge.

1 Like