Hey Community,
How can i check if a click (or a touch) is above an UI-Element and only do something if it's not?
I thought this would be easy but after I tried Raycasting with the UI-Layer blocked and Canvas Groups I still didn't find a solution.
My Problem is that an action has to be performed unless the player is clicking e.g. a button, and currently I dont have any idea on how to do that (also there isnt much information about that and the new UI system on the internet yet so I have to ask...
Perform Action only if click not above UI-Element
How can i check if a click (or a touch) is above an UI-Element and only do something if it's not?
I thought this would be easy but after I tried Raycasting with the UI-Layer blocked and Canvas Groups I still didn't find a solution.
My Problem is that an action has to be performed unless the player is clicking e.g. a button, and currently I dont have any idea on how to do that (also there isnt much information about that and the new UI system on the internet yet so I have to ask...
Perform Action only if click not above UI-Element