So I wanted to use “EventSystem.current.currentSelectedGameObject” to provide a tooltip in a fixed location. The idea is that based on the button selected I’d get an appropriate component, get the data from there and use it to display the appropriate tooltip.
Now currentSelectedGameObject gives back data, when I select something with the arrow keys (or my trusty XBox 360 controller), but it doesn’t return anything, when highlighting things with the mouse. This very weird since from the looks of it, hovering over something with the mouse selects that thing. After all if I have selected something with the keyboard, using the mouse to touch a different button deselects the last one…
Now the question is: Anyone got a good solution to this problem?
Using IPointerEnterHandler and ISelectHandler on a seperate script on the button that then talks to the toopltip-handling script, but this seems a bit clunky. After all now all the buttons needs to have access to the tooltip handling script, while doing it via the EventSystem seemed to be a lot more straightforward.