Unity Event that returns mouse over
Hi friends,
I am in need of a way to detect what the mouse is over. It is a bit more complicated than it sounds, a physics raycast won't work because i am interacting with the UI, I don't want to add colliders for these objects and I don't want to go to every single UI element that is in my game and have to call the mouse over event stuff.
This is for my player movement (point and click) I basically want to see if the mouse is over UI and then stop the player from moving when they're interacting.
I was looking at the IPointerEnterHandler interface but the problem is that is for objects too do something if the mouse is over them and what I want is just to read what the mouse is over from my movement script instead. Is there some other type of interface or event I can subscribe to in order to get that information?