Skip to content

Changelog

All notable changes to this package are documented in this file. The format is based on Keep a Changelog and this package follows Semantic Versioning.

  • Package skeleton: Runtime, Editor and test assemblies.
  • UIFlowNavigator: scored directional navigation (direction cone + distance) for any subtree, with a half-plane fallback so offset layouts never get stuck.
  • UIFlowDocument component to enable navigation on a UIDocument.
  • NavigationSettings to tune the cone angle and weights.
  • Focus rules: hidden, transparent, disabled, negative tabIndex, clipped (including USS overflow: hidden), off-screen, covered and transitioning elements are skipped. Content scrolled out of a visible ScrollView stays reachable.
  • uiflow-excluded and uiflow-transitioning USS classes, with SetNavigationExcluded / SetNavigationTransitioning extension methods.
  • Containers running a USS transition on translate, scale, rotate, opacity, position or size are skipped automatically.
  • Explicit navigation links per direction, by name (Name, #Name), USS class (.class) or element, plus none to block a direction. Set them from code (SetNavigationLink), in UXML on any element through a NavigationLinks entry in <Bindings>, or in USS/inline styles with --uiflow-nav-up/down/left/right. Links to containers enter them; links to elements that can’t take focus fall back to the search; missing targets log one warning.
  • Navigation scopes: a NavigationScope UXML element, or MakeNavigationScope() on any element. Per-axis edge behaviour (escape to the enclosing scope, stop, wrap), focus trapping for modals (links can’t lead out), and Cancel handling that raises cancelled and returns focus to the element that opened the scope.
  • Focus memory: scopes remember their last focused element, have a defaultFocus, can land on the remembered element when entered (enterBehavior), and can take focus automatically when shown (focusOnShow). Removed or hidden remembered elements fall back to the default focus, then the first element.
  • Focus-loss recovery: when the focused element is hidden, disabled or removed, focus moves to the nearest remaining element of its scope, unless the player last used a pointer. The first move with nothing focused restores the last focus (RestoreFocus).
  • UIFlowNavigator.FocusInto to open a screen or modal: focuses its remembered element, default focus, or first element.
  • RejectionReason and UIFlowNavigator.Evaluate to ask why an element can’t take focus.
  • Collections: entering a ListView / MultiColumnListView / TreeView reveals its selection, or selects the first visible item (the last when entering upwards); moves out of a long list start from the selected row. Entering a RadioButtonGroup lands on the checked option.
  • ScrollView support: the focused element is scrolled into view (scrollFocusedIntoView), and the d-pad scrolls a page instead of skipping long non-focusable content (scrollBeforeLeaving, scrollPageFraction). MakeScrollNavigable() turns a ScrollView without focusable content (credits, long text) into a scrollable focus target.
  • UIFlowDocument scrolls the ScrollView around the focused element with the gamepad’s right stick (rightStickScrollSpeed).
  • Open runtime dropdown menus trap focus; Cancel or a choice returns focus to the field.
  • Input devices: InputDeviceTracker follows the device the player used last (gamepad, keyboard, mouse/pen, touch) from the Input System, ignoring stick drift and mouse jitter. The panel root gets uiflow-navigating and uiflow-device-gamepad/keyboard/pointer/touch USS classes, so focus rings and hover styles can be scoped to the device in use.
  • Switching back to a gamepad or keyboard with nothing focused restores focus at once (restoreFocusOnDeviceSwitch); the press that switched only shows focus, it never also moves or submits. Hovering never moves focus.
  • Tab control (tabNavigation): Unity’s default order, disabled, or reading order that wraps and stays inside modals.
  • ScopeNavigationOrder.TabIndex: a scope can follow tabIndex order for every direction instead of the spatial search.
  • UIFlowDocument.hideCursorWhileNavigating hides the mouse cursor while a gamepad or keyboard is in use.
  • Debug overlay (UIFlowDebugOverlay, F9 on UIFlowDocument in the editor and development builds): outlines every focusable element in green, or red with the reason it can’t take focus, draws explicit links as arrows and blocked directions as bars, and after each move shows every candidate’s score or rejection reason and where focus went. Nothing is created or recorded while it is hidden.
  • Window > UI Toolkit > UIFlow Debugger: picks a live navigator in Play mode, toggles its overlay, lists the last move’s candidates sorted by score, and answers “why not?” for any element by name or class.
  • NavigationDebugger.Analyze / CollectLinks and NavigationMoveRecorder to inspect moves from code; UIFlowNavigator.lastStep tells which step decided the last move.
  • Sample 1, Main Menu: an irregular layout navigated by the scored search, links in USS and UXML, focus memory, default focus, a modal credits dialog with a scroll-navigable text, and device-aware focus and hover styles.
  • Sample 2, Settings Screen: sliders, toggles, dropdowns and a long scrolling list with a help panel that follows focus.
  • Sample 3, Inventory and Modal: an item grid with empty and locked slots, a 500-entry virtualized ListView, and a drop confirmation dialog that traps focus and hands it back.
  • Sample 4, Console Demo: a gamepad-first launcher with shoulder-button tabs that remember focus, a horizontal row and a grid of games, a store page in tabIndex order, a friends list, and nested screens closed one at a time with Back.
  • Documentation: quick start, concepts, API reference, troubleshooting and FAQ, and a migration note for users of the default FocusController.
  • Scroll bars inside a ScrollView were navigation candidates and could take focus; they are now excluded.
  • Leaving a ScrollView towards an element just outside it (a footer below a list) scrolled a whole page; focus now moves to the next row inside the scroll view first.
  • Two candidates at exactly the same distance were picked by hierarchy order; the one first in reading order (top to bottom, then left to right) now wins, so mirrored layouts behave the same.