How can you call a function from a script when a button is moused over?
I tried OnMouseEnter/Exit, even WITH a collider attached to the button. I also dont see any way to make it work like on CLICK does in the inspector, although that would be very convenient!
Here is my solution. I fire a ray throught the UI and see what it hits. If it is
a button etc. then I am in “Entering Text” mode which also covers hovering over a buttone and such. I also check the EventSystem.current.currentSelectedGameObject in case they are entering text in a field and have moved the mouse out of the field.
I also have a canvas called BackgroundEventCatcher which catches button click that get through the UI. I also have a class for showing notifications on the bottom edge of the screen.