How to not click Game Layer Objects behind UI object

So I have an object that is in the UI layer, but the problem is I can still click objects behind that UI object. Is there any way to fix this? I haven’t used the Click behavior much so not sure if there is an easy fix (Or hard, any fix is good)

3 Likes

If there is no easy fix I’ll just add a switch to turn those things off when the UI object comes on screen

4 Likes

I remember there used to be a time where objects at a higher display order would override the click behaviors of objects at a lower display order. I think it was a bug, because now it doesn’t seem to occur anymore.

I would suggest either using switches to toggle on/off the click behaviors. It is the simplest solution.

4 Likes

I think the easiest thing to do is use a switch if its position is over a ui element, turn off the switches for click.

You could have a parent object store the boundaries of the UI.

3 Likes