Question by
nplekhanov · Jan 08, 2021 at 12:42 AM ·
inputmouseeventeventsystem
How to detect if button is created under a mouse pointer taking into account UI hierarchy?
I have a menu with popup when mouse points any menu item. It's almost ok to use IPointerEnterHandler#OnPointerEnter, but this menu is dynamic and may be changed by some non-mouse related events, and OnPointeEnter is not called if button created under the mouse pointer until you moved mouse.
"OnMouseOver" would help me, but it's not UI centric and will ignore modal windows, for example.
Any other ways?
Comment