I am using UI Toolkit and I want to know whether the mouse pointer is above a UI element (VisualElement) to ignore any other in game hover effects on objects that are behind the UI element. Also I don’t want to trigger any in-game actions, when I for example click the mouse button on an UI element.
How I can I find out whether my mouse button is over an UI element? The Physics.Raycast(…) certainly ignores the UI elements and cannot be used. The old UI system had a GraphicRaycaster that could figure this out. But how would I do this for UI Toolkit? Is there a similar concept that I haven’t found, yet?
Thanks for any help.