Given a canvas with a couple of selectable objects (buttons, in my case), I want these buttons to initially start off with neither selected. But if the user starts mashing navigation inputs (e.g. arrow keys), it should select a button and let them get on with it.
How do I do this?
The standard solution to making keyboard navigation actually work, is to either set something as the First Selected on the EventSystem (which implies having one EventSystem for each menu), or using a script to .Select some item when the UI is presented (e.g., OnActivate).
But both of these solutions actually highlight the first item. I don’t want that. When you have two buttons, and one appears a different color than the other, it may not even be clear what the different colors mean — and it’s certainly going to look goofy, especially to a mouse user.
I suppose as a work-around I could put some invisible Selectable into the navigation hierarchy, and initially select that. But that means that as they cycle through the controls, there’s going to be a gap where it appears nothing is selected. Better than the alternatives above, but not ideal.
What would be ideal is a script that somehow detects that a navigation input has been received, sees that nothing is selected, and selects something. But I don’t see how to detect that. Any ideas?
(Well, OK, what would be ideal would be for the navigation system to not suck right out of the box. But I’m not holding my breath for that.)