I am looking to detect if my cursor is on top of any UI elements (GameObject). I want to prevent running a function by checking if my cursor is on top of any UI Element.
The function looks like this:
if (!pointerIsOnTopOfEvent) {
return;
} **// if the pointer here is on top of any UI element, stop doing the rest of the code**
if (build_Manager.GetFarmObjectToBuild()== null)
{
return;
}
nodeRender.material.color = hoverColor;
I really appreciate it if someone has other methods if EventSystems.EventSystem.IsPointerOverGameObject is deprecated.
This looks like the deprecated method in question. Do you have a solution for 2019.3?
– ManifoldI don't think is deprecated, it works on 2020.3 version. (Or maybe they decided to put it back.)
– Amperehour