- Home /
Canvas appearing over my cursor doesn'tr trigger OnPointerExit !
Hi! I am tring to make a tooltip.
When my mouse is over a building on my citybuilder game, a tooltip will apear, triggered by OnPointerEnter
When my mouse moves away from the building, the tooltip dissapears, triggered by OnPointerExit
PROBLEM: If my mouse is over the building, with the tooltip visible, and a popup (a Canvas) appears over it, it won't trigger OnPointerExit, thus the building tooltip will still be visible, ON TOP of the popup.
If I move the mouse slightly while the popup is below it, OnPointerExit on the building will trigger and hide my tooltip, but at this point it is too late.
=> How can I fix this behavior? Ideally I would like to detect when a new UI element blocks an old one and triggers the old one's loss of focus but I will take any suggestion. Thanks!
I made a reproduction project: link text