UI Toolkit: Focus & Navigation View on Asset Store (opens in new tab)

Package details

Latest version
1.0.2
Last updated
First released
Unity version
6000.3.10 or later
Package size
125 KB
Files
103
Favorites
2
Views in the past week
16

Price tracking

Last checked
Tracked since
Lowest recorded
$10.00 on

Keywords

UI Toolkit: Focus & Navigation

by KrookedLilly (opens in new tab)

No ratings yet

Drop-in gamepad and keyboard navigation for Unity UI Toolkit. Spatial nav, focus groups with four boundary modes, focus memory, device-aware indicators, six demo scenes.

Price $20.00

Buy on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for UI Toolkit: Focus & Navigation, 6 months Current $20.00; lowest $10.00; highest $20.00 in this period. $0 $10 $20 Jun Jul Aug Sep Oct Nov Version 1.0.1 released 5 Jun 2026 v1.0.1 Version 1.0.2 released 10 Jun 2026

Asset preview

1 / 6

UI Toolkit: Focus & Navigation screenshot 1

UI Toolkit: Focus & Navigation screenshot 1

About this asset

Unity's UI Toolkit ships without an equivalent to UGUI's Navigation component. Out of the box, gamepad and keyboard focus management is effectively broken — arrow keys don't move between buttons, focus rings don't hide for mouse users, and nested menus need custom plumbing for every edge case.

This asset fills that gap. Drop the included FocusManager prefab into your scene, register your focusable elements, and directional navigation works immediately.

Works on day one.

Spatial algorithm handles irregular layouts — mixed cell sizes, wide rows, gaps, sparse grids — no per-edge wiring. Push and pop focus groups for nested menus and modal dialogs. Focus memory restores the user to where they left off when they return to a previous group. Auto scroll-into-view keeps the focused element visible inside long ScrollViews.

Device-aware focus indicator.

The focus ring renders for keyboard and gamepad users but hides for mouse users automatically. Three visibility modes (Auto, AlwaysShow, AlwaysHide) let you override for accessibility or kiosk scenarios. The indicator itself is pluggable — supply your own IFocusIndicator implementation for animated rings, glow effects, or anything you like.

Six demo scenes included.

Basic Nav (3×3 grid starter), Grid Nav (irregular layout with wide cells), Nested Groups (push/pop with focus memory), Modal Trap (confirm dialog pattern), ScrollView (auto-scroll-into-view through a long list), and Device Switching (three indicator visibility modes shown in real time). Each demo ships with UXML, USS, controller script, and a README explaining what it shows.

Works with Screen Manager.

When UI Toolkit: Screen Manager is also installed, open Tools > KrookedLilly > Setup and enable the Screen Manager → Focus & Navigation integration. Each screen then owns a focus group automatically. Push or pop a screen and focus follows — Tab cycles within the active screen only, and returning to a previous screen restores focus to whichever element the user had selected. Per-screen default focus and boundary mode are one-line opt-ins:

ScreenFocusBridge.SetDefaultFocus(screenId, element);
ScreenFocusBridge.SetBoundaryMode(screenId, BoundaryMode.Trap);

Works with Tween Engine.

When UI Toolkit: Tween Engine is also installed, open Tools > KrookedLilly > Setup and enable the Tween Engine → Focus & Navigation integration. Then swap the default class-toggle indicator for TweenFocusIndicator — focused elements scale up smoothly with configurable target scale, duration, and easing. The USS class still applies, so existing border or color styling continues to work alongside the tween:

focusManager.IndicatorManager.Indicator = new TweenFocusIndicator();

Other UI Toolkit assets that consume Focus & Navigation (Modal & Notifications, Theme Switcher, Form Validation, Data Binding) toggle their integration from the unified Tools > KrookedLilly > Setup window. Integrations ship disabled by default — your project never picks up code from siblings you do not enable.

Full C# source, no DLLs.

XML documentation on every public API. Works with both Unity's Legacy Input Manager and the new Input System package (auto-detected at runtime). Zero hard dependencies.

From the publisher's Asset Store listing.

Technical details

Navigation

  • Spatial directional navigation using angle, distance, and perpendicular-overlap scoring (zero allocation per call)
  • Four boundary modes: Clamp, Wrap, Trap, Escape
  • Focus groups with push/pop stack semantics for nested menus and modals
  • Focus memory — each group remembers its last focused element
  • Explicit per-element navigation overrides with spatial fallback
  • Hold-to-repeat navigation with configurable initial delay and repeat rate

Input

  • Auto-detected input adapter: Legacy Input Manager or Input System package
  • Device auto-detection with distinct Mouse, Keyboard, Gamepad, and Touch values
  • Submit / Cancel routing with native UI Toolkit event suppression (no double-click, no focus drift)

Indicators

  • IFocusIndicator interface for pluggable focus visualization
  • USSClassIndicator default implementation using a .focused CSS class
  • Three visibility modes: Auto (mouse/touch hides, keyboard/gamepad shows), AlwaysShow, AlwaysHide

Scroll

  • Automatic scroll-into-view on keyboard/gamepad focus moves inside a ScrollView
  • Configurable margin, no-op for already-visible elements

Editor

  • Custom FocusManager inspector with an embedded UIDocument foldout
  • HideFlags utility prevents Unity's known MissingReferenceException on play-mode exit
  • Works cleanly across domain reloads and play-mode transitions

Included demos

  • BasicNavDemo — 3×3 grid, the "hello world" of focus navigation
  • GridNavDemo — irregular 13-button grid with wide cells stressing the spatial algorithm
  • NestedGroupsDemo — two side-by-side menu panels with symmetric escape-mode boundaries
  • ModalTrapDemo — reusable confirm dialog with destructive styling toggle per action
  • ScrollViewDemo — 33-item list with live "Visible: N–M of 33" range readout
  • DeviceSwitchingDemo — three-mode toggle row demonstrating indicator visibility behavior

Compatibility

  • Unity 6+ (6000.0 and newer)
  • UI Toolkit (com.unity.modules.uielements)
  • Full C# source, no DLLs
  • XML documentation on all public APIs
  • Zero external dependencies

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
6000.3.10f1 Compatible Compatible Compatible Compatible

As listed on the Asset Store.