PluginUnityComing soon

UIFlow

Controller navigation for UI Toolkit. Gamepad and keyboard focus that goes where players expect, with links, modals, lists, focus memory and a visual debugger.

Features

  • Scored spatial search that reaches offset and irregular layouts
  • Skips hidden, disabled, clipped, covered and animating elements
  • Explicit up/down/left/right links from USS, UXML or code
  • Scopes with wrapping or hard edges, modal focus traps and Back
  • ListView, TreeView, ScrollView, RadioButtonGroup and dropdown support
  • Focus memory per screen, tab and modal
  • Separate gamepad and mouse states, with no double highlights
  • Runtime debug overlay and an editor window that explains every move
  • Zero GC allocations per move, and 100+ tests

Make your UI Toolkit menus work on a gamepad, without writing focus code.

UI Toolkit’s built-in navigation only looks in a straight line, so offset buttons are never reached. Focus gets lost when an element hides, lands on things behind a modal or halfway through an animation, and lists don’t select anything. UIFlow fixes all of that. Add one component next to your UIDocument and press Play.

A scored spatial search finds the nearest element in the pressed direction, even in staggered and irregular layouts. It prefers elements that line up and never gets stuck. Unity’s wrap-around-the-whole-screen fallback is blocked: wrapping is up to you, per container.

Full control when you need it

Explicit links like uGUI, straight from USS (--uiflow-nav-down: "#Play";), UXML or code. Navigation scopes give you wrapping or hard edges, focus trapped in modals, Back returning to whatever opened them, and a curated tabindex order that also drives the d-pad. Exclude any element or subtree with one USS class.

Lists, scroll views and dropdowns

ListView, MultiColumnListView and TreeView select a row when entered, including virtualized lists. ScrollViews keep focus visible and page through long content instead of skipping it. The right stick scrolls, RadioButtonGroups land on the checked option, and open dropdowns keep focus.

Focus that never gets lost

Every screen, tab and modal remembers where the player was. When the focused element disappears, focus moves to the nearest one left. Switching from the mouse back to a gamepad restores focus without pressing anything by accident.

Mouse, touch, keyboard and gamepad together

USS classes on the panel tell you which device is in use, so focus rings show only while navigating and hover only with a mouse. A device tracker helps you swap button prompts, and you can hide the cursor while navigating. Tab can follow Unity’s order or reading order, or be turned off.

See what the navigator sees

A runtime overlay (F9) draws every focusable element and the links as arrows, and shows why each candidate was rejected. An editor window lists the scores of the last move and answers “why didn’t focus go there?”.

Four samples

  1. A main menu with an irregular layout, links and a modal.
  2. A settings screen with tabs, sliders, toggles, dropdowns and a scrolling list.
  3. An inventory with a grid, a virtualized list and a confirmation dialog.
  4. A gamepad-first, console-style launcher with shoulder-button tabs, horizontal rows and nested screens.

Built for shipping

Opt in per panel or per element; the rest of your UI keeps Unity’s behaviour, and mouse and touch input are unaffected. Full source in one namespace, with no third-party dependencies beyond Unity’s Input System.