Async modal dialogs, toasts, loading overlays, and popup menus for Unity UI Toolkit. One drop-in component, five demo scenes, zero hard dependencies.Unity's UI Toolkit ships with VisualElements and USS but no modal API, no toast system, no popup menu primitive, and no loading overlay. Every game ends up rebuilding the same scaffolding — input blocking, z-order stacking, backdrop dimming, queue management, and enter/exit animations — from scratch.This asset is the missing layer. Drop a single OverlayManager component on your UIDocument and your panel gains async/await modal dialogs, a full toast notification system, region-scoped loading overlays, popup menus with anchor-flip positioning, and a built-in keyboard focus trap.Modals that feel native.Five dialog types out of the box: `ModalDialog.AlertAsync`, `ConfirmAsync`, `PromptAsync`, `ChoiceAsync`, and `ShowCustomAsync`. Every dialog is awaitable so your code reads top-to-bottom — `bool ok = await ModalDialog.ConfirmAsync("Delete?", "This cannot be undone.")`. Cancellation tokens, Escape-to-dismiss, default-button Enter handling, and a destructive-action preset all ship configured. The built-in keyboard focus trap keeps Tab and arrow navigation inside the topmost modal.Toasts with real ergonomics.Four toast types (Info / Success / Warning / Error), seven positions covering every UI corner, per-position lane stacking, queue management with three overflow strategies (Queue / ReplaceOldest / Drop), and a `ToastHandle` for live updates and dismissal. Toasts support icons, action buttons, progress bars, persistent variants, swipe-to-dismiss, and tap-to-dismiss. The static `Toast.Show*` API handles the simple case; `ToastOptions` exposes the full configuration surface when you need it.Loading overlays that just work.`LoadingOverlay.ShowAsync` blocks input on the entire panel; `ShowInRegionAsync(region, ...)` blocks input only inside a supplied VisualElement so the rest of your UI stays interactive. Four indicator styles ship animated from C# so they work without any USS theme: Spinner (rotating ring), HorizontalBar (determinate fill), CircularRing (true radial arc drawn via Painter2D), and Shimmer (sweeping highlight). A `LoadingHandle` updates message and progress on the fly. A minimum-display-time guard prevents the flash you get when a load operation completes faster than the user can see it.Popups, dropdowns, and tooltips included.`PopupMenu.ShowAtAsync` with enabled/disabled rows, separators, icon text, and shortcut hints. `Dropdown` is searchable, single or multi-select, and virtualized via ListView so 100+ options stay responsive. `Tooltip.Attach` wires hover/focus tooltips with configurable delay. Every popup automatically dismisses on outside click, Escape, or a second click on the trigger element (toggle-to-close). A pure-function `PopupAnchorResolver` flips popups to the opposite edge when the preferred side would overflow the viewport.Theming via CSS custom properties.Override the bundled `ModalNotificationsDefaultTheme.uss` by setting 35+ CSS custom properties in your own USS — modal background, toast colors, loading indicator color, popup background, tooltip background, and more. A dark theme variant ships as a `.theme-dark` override class. The default theme auto-loads at runtime so overlays look correct the moment you press Play.Five demo scenes included.Modal Showcase (Alert / Confirm / Prompt / Choice / Destructive), Modal Stacking (three layered modals with compounding backdrops and LIFO dismissal), Toast Gallery (every type and position), Loading Overlay (all four indicator styles plus the region variant), and Popup Menu (context menu, dropdown, tooltip). Each demo ships with UXML, USS, controller script, and a README explaining what it shows.Works with UI Toolkit: Screen Manager.Opt into automatic overlay dismissal when a screen exits — useful when navigating away from a level / settings panel should also close any open modal or notification. Install UI Toolkit: Screen Manager, enable the integration via Tools > KrookedLilly > Screen Manager Setup, then:```csharpScreenManagerIntegration.DismissOverlaysOnScreenExit = true;```Animated transitions via UI Toolkit: Tween Engine.For smooth modal, toast, and dropdown enter/exit transitions, install UI Toolkit: Tween Engine and enable the integration via Tools > KrookedLilly > Tween Engine Setup. The integration registers an OverlayAnimationProvider that interpolates opacity and scale with configurable easing. Without Tween Engine, overlays appear and disappear instantly.Works with UI Toolkit: Focus & Navigation.Install UI Toolkit: Focus & Navigation and enable the integration via Tools > KrookedLilly > Focus & Navigation Setup. The element that triggered an overlay is automatically refocused when the overlay dismisses, so keyboard and gamepad navigation pick up where the user left off. Works with any focusable element — no per-overlay wiring needed.Works with UI Toolkit: Responsive Layout.Install UI Toolkit: Responsive Layout and enable the integration via Tools > KrookedLilly > Responsive Layout Setup. Overlays then automatically respect the device safe area — toasts stay clear of notches and home indicators, modals are padded inside the visible region. A `.overlay-breakpoint-{name}` USS class is applied to the overlay container per active breakpoint so you can resize toasts and modals per device class from your stylesheet.Every integration ships disabled by default; enable each one from the relevant Setup panel.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. Zero hard dependencies on other assets.Core- OverlayManager component with z-order stack, configurable max depth, lazy-instantiated toast manager, async lifecycle timeout guard, and `BlockTransitions` signal- OverlayBase state machine (Created → Entering → Visible → Exiting → Hidden) with CancellationToken plumbing, USS class toggling, and a pluggable animation-provider hook- Backdrop element with dismiss-on-click and custom color- OverlayInputBlocker primitive — consumes pointer and navigation events via StopImmediatePropagation, IDisposable- Built-in panel-root focus trap keeps Tab and arrow navigation inside the topmost overlay; supports NavigationCancelEvent so gamepad B button dismisses modalsModal Dialogs- ModalDialog static API: `AlertAsync`, `ConfirmAsync`, `PromptAsync`, `ChoiceAsync`, `ShowCustomAsync`- ModalOptions with `DismissOnEscape`, `DismissOnBackdropClick`, `BackdropColor`, custom button text- AlertDefaults / ConfirmDefaults / DestructiveConfirmDefaults presets- Modal enter/exit transitions supplied by the optional Tween Engine integration (scale + fade with configurable easing); without it, modals appear instantly- ModalContainer with public USS class constants for restyling- ModalOverlay exposed publicly for advanced compositions (e.g., custom multi-modal flows)Toasts- Static Toast.Show* API plus full-power ToastManager- Four types (Info / Success / Warning / Error) and seven positions- ToastHandle with `Dismiss`, `UpdateMessage`, `SetProgress`, `IsActive`, `OnDismissed` event- ToastSwipeManipulator — horizontal/vertical swipe-to-dismiss with configurable threshold- ToastOptions: icon, action button callback, progress bar, persistent, swipe/tap dismiss togglesLoading- LoadingOverlay.ShowAsync (full-screen) and ShowInRegionAsync (region-scoped via OverlayInputBlocker)- Four indicator styles plus a Custom slot for caller-supplied visuals- C#-driven animations: Spinner rotates via style.rotate; Shimmer sweeps an inner highlight bar; CircularRing strokes a true arc via Painter2D- LoadingHandle with progress + message API and minimum-display-time guard (default 500 ms)Popups- PopupMenu.ShowAtAsync with PopupMenuItem (Label / IconText / ShortcutHint / IsEnabled / Callback) and separator support- Dropdown.ShowBelowAsync — searchable, single or multi-select, ListView-virtualized- Tooltip.Attach with above / below / left / right / auto positioning- PopupAnchorResolver — pure static function that flips to the opposite side when the preferred edge overflows- PopupDismissHandler — scoped click-outside + Escape + toggle-on-trigger handler used by every popupTheming- ModalNotificationsDefaultTheme.uss with 35+ CSS custom properties auto-loaded at runtime via Resources- ModalNotificationsDarkTheme.uss — apply by adding `.theme-dark` to a parent element- Per-instance override via `_customTheme` serialized field on OverlayManager- Opt-out toggle (`_applyDefaultTheme`) for projects that ship their own complete themeEditor- Custom OverlayManager inspector embeds the sibling UIDocument editor in a foldout- Runtime state panel shows active overlay count, BlockTransitions flag, and toast overflow behavior- HideFlags three-layer pattern (runtime guards + custom inspector + `[InitializeOnLoad]` enforcer) prevents Unity's known MissingReferenceException on play-mode exit- Works cleanly across domain reloads and play-mode transitionsIncluded demos- ModalShowcaseDemo — Alert, Confirm, Prompt, Choice, and Destructive variants with status logging- ModalStackingDemo — three modals stack with compounding backdrops; focus trap retargets to the new topmost as each dismisses- ToastGalleryDemo — every toast type and position, plus action buttons and progress bars- LoadingOverlayDemo — Spinner / HorizontalBar / CircularRing / Shimmer indicators plus a region-scoped variant- PopupMenuDemo — context menu, dropdown, and hover-triggered tooltip with anchor-flipCompatibility- 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 dependenciesAI (Claude Code) was used as a development assistant throughout the package creation process. This includes code generation, architecture design, writing unit tests, documentation authoring, and debugging. All AI-generated code was reviewed, tested, and validated by the developer. The final package is 100% human-supervised C# source code with no AI runtime components.



