The FocusController makes the UI difficult to design

These are the problems with the FocusController:

  • It is impossible to know which elements are registered in the controller

  • It is impossible to add and remove elements into and from the controller

  • With 2022 versions it does not contains buttons anymore, so pressing the TAB key does not switch to the next button.

  • ListView and ScrollView are not supported but when they have a scroller visible then this one takes focus instead. So I have to design an alternative method to give focus to these kind of elements when using a gamepad.

  • It listens to TAB event even if Navigation is disabled in the event system, there is no way to disable it.

  • The tabindex works only for the TAB key so with a gamepad the order is different.

  • There is a focusindex setting that is undocumented

So, if I want my UI to support keyboard and gamepad, I can’t because I can’t access all the elements and I can’t take over and disable it. For accessibility I need the UI to be 100% controllable with the keyboard only, for the steam deck I need the UI to be 100% controllable with the gamepad.

I have posted many bug reports about the UI Toolkit, there has been some improvements, such has the ability to increment and decrement slider with gamepad, but the focuscontroller is still really a burden to use.

ETA: i have figured out why the buttons do not respond to TAB: they have tabindex set to -1 by default.

Just a fyi, this is a regression and has been reported.

https://issuetracker.unity3d.com/issues/gamepad-left-stick-is-not-working-with-modified-ui-builder-components

Thanks, there is another issue with TAB events, it is that they are used to navigate in lists and dropdowns, making the whole UI inconsistent because I cannot remap the left stick to navigate among the UI elements and the right stick to navigate in lists and dropdowns.