Makes Unity's USS transitions behave as expected. Fixes six recurring UI Toolkit failures — silent snaps, classes that never match, callbacks that fire twice. And it tells you when one didn't run.Cue contains no rendering code. It adds and removes USS classes; UI Toolkit draws everything. Verified on Built-in, URP 17.5.0 and HDRP 17.5.0. Custom SRPs are untested — the Custom RP box is unchecked for that reason, not because of a known problem. The included demo scene contains no renderers, materials, shaders or lights; its background is drawn entirely in USS.
Cue drives Unity's USS transitions. It doesn't replace them.
UI Toolkit has a good transition system, but it can fail six different ways. I found many of these failures when building my own projects.
Cue is a safety layer that absorbs the six failures. Adds and removes USS classes, and that's it. No tween engine, no per-frame interpolation, no inline styles, no manager object, no singleton, no scene setup.
panel.Cue().To("panel--visible").Play();
What it fixes
— Adding the base and destination class in the same frame fails because the initial style isn't resolved. Cue waits for it.
— Elements created in C# have no stylesheet in scope, so the class matches no selector. Cue states this, and names the stylesheets that are in scope.
— TransitionEndEvent fires once per property, so naive completion logic runs twice. OnComplete runs exactly once.
— Removing an element, disabling a UIDocument or loading a scene mid-transition leaves errors and stuck states. Cue cancels cleanly instead.
— An inline style set from C# silently overrides the selector. Cue names the exact property and prints the one-line fix.
— Looping means hand-wiring TransitionEndEvent and toggling classes. PingPong() is one call.
It works with pooled elements
Take an element from a pool, re-add it and play in the same frame, and the transition snaps — the element's layout survived the detach but its style did not. Cue handles it, so recycled list rows animate the same on their fortieth use as their first.
The error messages are the product
When a cue does nothing, Cue prints one error naming the element, the class, the likely cause ranked by what it can actually observe in your project, and the fix. Development builds only — it is compiled out of release builds entirely.
Compatibility
Unity 2022.3 and later. No dependencies outside Unity's own packages. Assembly definitions are included. Cue never reads input or touches rendering.
On Unity 2022.3 with the Input System package only, UI Toolkit needs an EventSystem in the scene to receive pointer input. That affects the included demo scene, not Cue itself, and the demo tells you when you're in that configuration.
Demo
A pause menu that runs from a fresh import with no setup. Each fix is shown as something a player would see and not just a bunch of labelled test cases.
Documentation
Included in the package, and written for someone who has never authored a USS transition — one page gets you from an empty stylesheet to a working fade. Every code and USS sample in the documentation is compiled and run by the test suite, so none of them can drift out of date.


