Block Raycast with Ui in Andoid
My problem is that I have a canvas with two buttons and scriipt that is for selecting objects, when I touch the buttons the raycast go through and i selecet the object behind and at the same time use the button. I just what to use the button. I have seen thay you can do block the raycast with the event system
if(!EventSystems.current.IsPointerOverGameobject())
return;
Its giving me an error when i put using UnityEngine.EventSystems; in the script and I think is dosnt work in andoird neither. Sorry for my bad English.
Your answer
Follow this Question
Related Questions
GUI buttons within an augmented GameObject AR Foundation 0 Answers
Laser pointer style UI interaction in VR 2 Answers
Unity Button reacts even if Canvas is disabled 0 Answers
Having trouble fading in/out animation on Android 2 Answers
Canvas scaling blurry 0 Answers