API reference
Every public type and member, generated from the comments in the source. Members marked Lite are in both tiers; everything else is Pro.
All types are in the Cascade namespace. Durations are in seconds.
Start an animation
VisualElementAnimationExtensions class Lite
Entry points for the fluent API. These are the only symbols most users touch.element.Animate()… returns a TweenSequence you can chain and keep as a handle.
static TweenSequence Animate(this VisualElement element)TweenSequence is both the builder and the control handle. Dispatch is deferred to the next scheduler tick.static void StopAnimations(this VisualElement element)static bool StopAnimations(this VisualElement element, MotionChannel channel)el.StopAnimations(MotionChannel.Opacity) freezes a running fade at its current value while a simultaneous move keeps going. O(1) via the engine's channel-claim registry. Only the cancelled tween is affected: it goes inert but keeps its place in the sequence timeline, so siblings keep running, .Then() steps still start at their authored time, and the sequence's OnComplete still fires (at the authored time) when something in it finishes naturally, unless the cancelled channel was the sequence's only content (then it's a cancel: no OnComplete, per the engine's Cancel ≠ complete rule). Scope caveats: this stops the tween currently animating that channel, a tween still in its .Delay(), queued in a later .Then() step, or dispatched this frame has no channel claim yet, is not targetable (returns false), and will play at its authored time as a separate animation. Closure-mode verbs (SlideIn/MoveTo/colors) have no channel identity, use StopAnimations for those.Returns: True when a live animation on that channel was stopped.
static StaggerBuilder AnimateEach(this IEnumerable<VisualElement> elements)i offset by i * stagger.static TweenSequence AnimateAll( this IEnumerable<VisualElement> elements, Func<VisualElement, float> captureFrom, float to, Action<VisualElement, float> apply, float duration, float stagger, EaseFunction ease = null, MotionChannel channel = MotionChannel.Custom)i * stagger), instead of one independent tween per element. At 500-element scale that's ONE runner slot + one resolvedStyle read per element (captured once at start) rather than N tweens each re-stepping, far less dirty-flag and bookkeeping churn. Returns the group handle (pause/cancel the whole stagger at once). captureFrom reads each element's start value (captured at that element's own start, not the group's); apply writes the interpolated value; both run per element. The element collection is snapshotted at call time. For the common case use StaggerFade. The group lasts duration + (count-1) * stagger, not duration. A fixed per-element stagger therefore scales with the collection, see Stagger for TotalDuration (to schedule after a group) and StepForSpan (to pin its length). The group is ONE tween on the shared host, so cancelling it needs this handle; StopAnimations() on a member element will not stop it.Returns: The group handle, or null when elements is null/empty (no-op).
static TweenSequence AnimateAll( this IEnumerable<VisualElement> elements, Func<VisualElement, Color> captureFrom, Color to, Action<VisualElement, Color> apply, float duration, float stagger, EaseFunction ease = null, MotionChannel channel = MotionChannel.Custom)AnimateAll, but capturing and interpolating a Color per element. This overload exists because the obvious way to write a colour sweep with the float version is wrong in a way that looks right. Lerping from resolvedStyle.backgroundColor inside the apply callback reads the value the previous frame wrote, so each frame blends a shorter remaining distance and the colour converges early instead of travelling the curve, it merely looks like a soft ease, which is why it ships. Here the start colour is captured once, at each element's own start, exactly like every other verb.Returns: The group handle, keep it if anything else will later write these elements, because a coalesced group is ONE tween hosted on the shared parent and StopAnimations() on an individual element does not reach it.
static TweenSequence StaggerFade(this IEnumerable<VisualElement> elements, float to, float duration, float stagger, EaseFunction ease = null)elements, the cascade list entrance. One tween for the whole group (see AnimateAll).The animation handle
TweenSequence class Lite
What Animate() returns: you chain verbs on it to build the animation, and keep it to control the animation (Pause, Resume, Cancel, await). Verbs add to the current step and run together; Then() starts the next step. The animation starts on the element's next frame, so everything you chain in the same line applies.
TweenSequence Fade(float to, float duration)opacity to to over duration seconds.TweenSequence FadeTo(float to, float duration)Fade, matches the FadeTo name used by the Interaction and Variant APIs (and the JSON "Fade" verb's C# alias), so converting between them is mechanical.TweenSequence MoveX(float to, float duration)style.translate (pixels).TweenSequence MoveY(float to, float duration)style.translate (pixels).TweenSequence SlideIn(Edge edge, float duration, float distance = 48f)edge: it starts offset by distance px in that direction and animates style.translate to 0. Unlike the other verbs this uses an explicit "from" (the offset), and pre-positions the element immediately so there is no first-frame flash at its layout position. Pair with Fade for the classic cascading-menu entrance.TweenSequence ScaleTo(float to, float duration)style.scale to to.TweenSequence Scale(float to, float duration)ScaleTo, matches the JSON "Scale" verb name, so an AI converting JSON to fluent C# can use the same name instead of knowing the ScaleTo rename.TweenSequence Rotate(float toDegrees, float duration)style.rotate.TweenSequence MoveTo(Vector2 to, float duration)style.translate to a target offset (pixels) on both axes at once.TweenSequence Nudge(float x, float y, float duration)x, y pixels and bring it straight back, the "your input was rejected" bump, a damage shake, an error wobble. Additive, and that is the whole point. A nudge does not claim TranslateX/Y, so it composes with whatever is already positioning the element instead of superseding it. A piece being animated toward a grid cell can bump against a wall without its follow animation being cancelled, which is impossible with MoveX, because a second value-mode tween on an owned channel cancels the first outright. Self-restoring: the offset follows a half-sine, so it is guaranteed to be back at zero when the tween ends, and it is released if the sequence is cancelled part-way.TweenSequence NudgeX(float x, float duration)Nudge, the sideways bump.TweenSequence NudgeY(float y, float duration)Nudge, the impact drop.TweenSequence BackgroundColor(Color to, float duration)style.backgroundColor.TweenSequence Value(float from, float to, float duration, Action<float> onValue)from to to, handing each frame's value to onValue. The one verb that writes nothing itself, it exists for everything a game HUD needs that is not a style property: a score counter rolling up, a health bar's backing value, a countdown, an audio duck. Composes with every modifier, so a rolling counter can spring: Interruption. A value tween has no style channel to own, so consecutive ones stack rather than supersede, two rolls at once will fight over the label. When the value can change again mid-roll (a score usually can), keep the handle and Cancel it before starting the next, and pass the currently-displayed value as from.onValue- Called once per frame with the interpolated value. Must tolerate being called a single time at
fromand then cancelled.
TweenSequence TextColor(Color to, float duration)style.color (text/tint color).TweenSequence Width(float toPixels, float duration)style.width (pixels). Layout-affecting: triggers a reflow each frame, costlier than transform verbs. Prefer ScaleTo where a visual size change suffices.TweenSequence Height(float toPixels, float duration)style.height (pixels). Layout-affecting, see Width.TweenSequence Size(float toWidth, float toHeight, float duration)width and height (pixels). Layout-affecting, see Width.TweenSequence Top(float toPixels, float duration)style.top (pixels). Layout-affecting, see Width.TweenSequence Left(float toPixels, float duration)style.left (pixels). Layout-affecting, see Width.TweenSequence From(float value)value instead of from wherever the element currently is. This is how you write an entrance. Verbs animate to a value and read from the live one at start, so Fade(1f, 0.3f) on an element that is already opaque is a legitimate no-op, correct, and not what "fade in" means. Naming the start makes the intent explicit: The start value is written immediately, at build time, so there is no frame of the old value before the animation's first write. Skipped when the current motion mode would snap rather than play, where priming would itself be the flash. Value verbs only (Fade/Scale/MoveX/MoveY/Rotate/…); ignored by SlideIn, which already positions its own start, and by the vector and colour verbs. Two consequences of writing the value early. Cancel before the sequence dispatches leaves the element AT the start value, cancelling does not undo the prime, because Cancel leaves things where they are by design. And if another tween is already animating that channel it keeps writing until this one supersedes it, so the no-flash guarantee holds on an idle channel, not on a contested one.TweenSequence Ease(EaseFunction ease)TweenSequence Spring(SpringPreset preset)Fade(1f, 0.4f).Spring(SpringPreset.Gentle) does not take 0.4s, it takes however long that spring takes. Pass 0f to make that obvious to the next reader.TweenSequence Spring(SpringConfig config)TweenSequence WithResponse(float response, float bounce = 0f)response = period in seconds, bounce = arrival character); full model on FromResponse. Named distinctly from Spring(...) so the literal call Spring(0) can't become ambiguous with the enum overload.TweenSequence Delay(float seconds)seconds before it starts.TweenSequence Loop(LoopMode mode, int count = 0)count ≤ 0 loops forever.TweenSequence OnUpdate(Action onUpdate)TweenSequence Then()TweenSequence OnComplete(Action onComplete)TweenSequence OnSettled(Action<bool> onSettled)true if it completed naturally, false if it was cancelled or superseded. Same verdict the awaitable returns. Prefer this to OnComplete for anything a user can see. Cancel is not Complete: starting a new value-mode tween on the same element and channel supersedes the prior sequence, and OnComplete then never runs. That is correct, but it means a selection highlight, an enabled state, or a "now it's safe to repaint" step hung off OnComplete simply will not happen if the user interacted during the animation. The symptom is a UI that looks broken intermittently, with no error.TweenSequence IgnoreReducedMotion()ReduceMotion is on (e.g. an essential transition that must still play).bool IsActivevoid Pause()Resume.void Resume()Pause.void Cancel()Awaitable<bool>.Awaiter GetAwaiter()bool completed = await element.Animate().Fade(1f, 0.3f); Resumes on the main thread when the animation ends. The result mirrors OnComplete exactly.true when the sequence finished (OnComplete fired), false when it was cancelled or superseded, cancellation never throws, and the continuation can branch on the result instead of mistaking an interruption for completion (Cancel ≠ complete). Await a sequence once. Detaching the element resolves the await as false whether it happens mid-flight or in the same frame the sequence was built. Note: like OnComplete, an animation on an element that is never attached to a panel never starts and so never resolves, there is no detach to observe; Cancel resolves it immediately.Awaitable<bool> AsAwaitable()Awaitable{T} (see GetAwaiter). Allocated lazily on first call; already-ended sequences resolve immediately.LoopMode enum Lite
How a finished tween repeats.
NoneRestartPingPongEdge enum Lite
Which screen edge a slide transition enters from / exits toward.
LeftRightTopBottomEasing
Ease class Lite
Standard easing curves. Mirrors the set Unity exposes via UIElements.Experimental.Easing but lives in our namespace so the public API never depends on an Experimental.* type.
static readonly EaseFunction Linearstatic readonly EaseFunction InSinestatic readonly EaseFunction OutSinestatic readonly EaseFunction InOutSinestatic readonly EaseFunction InQuadstatic readonly EaseFunction OutQuadstatic readonly EaseFunction InOutQuadstatic readonly EaseFunction InCubicstatic readonly EaseFunction OutCubicstatic readonly EaseFunction InOutCubicstatic readonly EaseFunction InQuartstatic readonly EaseFunction OutQuartstatic readonly EaseFunction InOutQuartstatic readonly EaseFunction InExpostatic readonly EaseFunction OutExpostatic readonly EaseFunction InOutExpostatic readonly EaseFunction InCircstatic readonly EaseFunction OutCircstatic readonly EaseFunction InOutCircstatic readonly EaseFunction InBackstatic readonly EaseFunction OutBackstatic readonly EaseFunction InOutBackstatic readonly EaseFunction InElasticstatic readonly EaseFunction OutElasticstatic readonly EaseFunction InOutElasticstatic readonly EaseFunction OutBouncestatic readonly EaseFunction InBouncestatic readonly EaseFunction InOutBouncestatic EaseFunction FromCurve(AnimationCurve curve)AnimationCurve as an EaseFunction.static EaseFunction From(EaseKind kind)EaseKind (used by inspector presets) to its function.EaseKind enum Lite
Serializable selector for an easing curve, lets inspector presets / the codeless workflow pick an easing in a dropdown (an EaseFunction delegate can't be serialized). Resolve with From.
LinearInSineOutSineInOutSineInQuadOutQuadInOutQuadInCubicOutCubicInOutCubicOutQuartOutExpoOutCircInBackOutBackInOutBackOutElasticOutBounceSprings
SpringPreset enum Pro
Named, hand-tuned spring feels exposed in the fluent API and inspector.
GentleSnappyBouncySpringConfig struct Pro
Physical spring parameters. Springs are the headline capability USS transitions and experimental.animation cannot express.
float Stiffnessfloat Dampingfloat Massbool ClampOvershootSpringConfig(float stiffness, float damping, float mass = 1f)static SpringConfig From(SpringPreset preset)static SpringConfig FromResponse(float response, float bounce = 0f, float mass = 1f)response is the oscillation period in seconds, smaller = faster/snappier (0.15 = a quick control, 0.5 = a large panel). bounce is how springy the arrival is: 0 = smooth, no overshoot (critically damped); toward 1 = very bouncy; negative = overdamped (a flattened, viscous arrival). Maps analytically onto stiffness/damping.k = m·(2π/response)², c = (1−bounce)·2·√(k·m).SpringConfig WithClampOvershoot()ClampOvershoot enabled (fluent).Stagger
StaggerBuilder class Pro
The builder AnimateEach() returns: the same verbs as an animation, played on every element of a list, each starting Stagger(seconds) after the previous one.
StaggerBuilder Fade(float to, float duration)StaggerBuilder MoveX(float to, float duration)StaggerBuilder MoveY(float to, float duration)StaggerBuilder ScaleTo(float to, float duration)StaggerBuilder SlideIn(Edge edge, float duration, float distance = 48f)StaggerBuilder From(float value)value on every element, the staggered entrance idiom, and the reason most people reach for stagger in the first place. Every element primes at dispatch and then animates on its own offset, so a list cascades in from hidden rather than each item popping at full opacity. Without this the only way to write a staggered entrance was to set the inline style on every element by hand first, which is what the shipped sample had to do.StaggerBuilder Ease(EaseFunction ease)StaggerBuilder Spring(SpringPreset preset)StaggerBuilder Spring(SpringConfig config)StaggerBuilder Delay(float seconds)StaggerBuilder Loop(LoopMode mode, int count = 0)StaggerBuilder Then()StaggerBuilder Stagger(float secondsBetween)0 = all together (pure parallel).StaggerBuilder OnComplete(Action onComplete)Stagger class Pro
Timing math for staggered groups, exposed so callers can schedule around one. A stagger does not take duration seconds, it takes duration + (count - 1) * stagger, because the last element has not started yet when the first one finishes. That means a fixed per-element stagger makes the group's length scale with the collection: the same code that spans 0.2 s over ten elements spans 0.9 s over forty. If anything is timed to happen after the group, a repaint, a state change, a second animation, it will be correct while you are testing with a small collection and wrong in production. Use TotalDuration to schedule after a group, or StepForSpan to pin the group's length regardless of how many elements it turns out to contain:
static float TotalDuration(int count, float duration, float stagger)(count - 1) * stagger and then runs for duration.static float StepForSpan(int count, float spanSeconds, float maxStep = float.PositiveInfinity)count elements over spanSeconds of start offsets, so the group's total length is duration + spanSeconds whatever the count.maxStep- Upper bound on the gap between neighbours, so a small collection does not get an absurdly slow cascade just to fill the span. Defaults to unbounded.
Transitions
Transition struct Pro
A reusable enter/exit transition preset, fade, slide (from an Edge), scale, and their combinations. Build one with a factory and play it with the AnimateIn / AnimateOut / Show / Hide / SwapTo extensions (see TransitionExtensions). Easing or a spring is an optional refinement via WithEase / WithSpring. Springs + reusable presets are exactly what USS transitions can't express. This is a value type, modifiers return a copy.
bool DoFadebool DoSlideSlideEdge over SlideDistance.Edge SlideEdgeDoSlide).float SlideDistancebool DoScaleScaleFrom to 1 (in) / 1 to it (out).float ScaleFromfloat DurationEaseFunction Easebool UseSpringEase.SpringConfig SpringUseSpring is set.static Transition Fade(float duration)static Transition Slide(Edge edge, float duration, float distance = 48f)static Transition Scale(float duration, float from = 0.85f)from and 1.static Transition SlideFade(Edge edge, float duration, float distance = 48f)static Transition ScaleFade(float duration, float from = 0.85f)static Transition Crossfade(float duration)Fade.Transition WithEase(EaseFunction ease)Transition WithSpring(SpringPreset preset)Transition WithSpring(SpringConfig config)Transition WithResponse(float response, float bounce = 0f)response = period in seconds, bounce = arrival character); full model on FromResponse.Transition WithDistance(float distance)TransitionExtensions class Pro
Play Transition presets on elements: enter/exit (AnimateIn/ AnimateOut), display-aware Show/Hide, and a minimal screen swap (SwapTo).
static TweenSequence AnimateIn(this VisualElement element, Transition t)static TweenSequence AnimateOut(this VisualElement element, Transition t)Hide).static TweenSequence Show(this VisualElement element, Transition t)display:flex, then animate the element in.static TweenSequence Hide(this VisualElement element, Transition t)display:none, but only on natural completion (a cancelled hide leaves it shown, per the engine's Cancel ≠ complete rule).static void SwapTo(this VisualElement container, VisualElement target, Transition t)target in container, and animate target in. With Crossfade the out/in overlap.Hover, press and focus
InteractionExtensions class Pro
Entry points for declarative micro-interactions.
static Interaction OnHover(this VisualElement element)static Interaction OnPress(this VisualElement element)static Interaction OnFocus(this VisualElement element)Interaction class Pro
A declarative hover / focus / press micro-interaction bound to a VisualElement: on activation it animates to an "active" look (e.g. scale 1.05), on release it settles back to the resting look. Driven by pointer/focus events, it is interruption-safe, each transition cancels the previous one and re-captures the current value, so rapid in/out never snaps. Created via element.OnHover() / OnPress() / OnFocus() (see InteractionExtensions):
Interaction ScaleTo(float scale, float duration, EaseFunction ease = null)scale while active; settle back to rest on release.Interaction FadeTo(float opacity, float duration, EaseFunction ease = null)opacity while active; settle back to rest on release.Interaction RotateTo(float degrees, float duration, EaseFunction ease = null)degrees while active; settle back to rest on release.Interaction BackgroundColorTo(Color color, float duration, EaseFunction ease = null)style.backgroundColor while active; settle back to the resting colour on release. With OffsetTo, this is what a menu row actually needs: the surface lifts and the label slides. Scaling a full-width row instead grows its text with it, which is why scale-only interactions never looked right on lists.Interaction TextColorTo(Color color, float duration, EaseFunction ease = null)style.color (text) while active; settle back on release.Interaction OffsetTo(float x, float y, float duration, EaseFunction ease = null)x, y pixels relative to where the element was resting when the interaction first fired, and slide back on release. Transform-only, so it never reflows the list around it.Interaction OffsetXTo(float x, float duration, EaseFunction ease = null)OffsetTo, the label-slide of a selected menu row.Interaction WithSpring(SpringPreset preset)Interaction WithSpring(SpringConfig config)Interaction WithResponse(float response, float bounce = 0f)response = period in seconds, bounce = arrival character); full model on FromResponse.InteractionTrigger enum Pro
Which input state drives a micro-interaction.
HoverPressFocusNamed states
VariantExtensions class Pro
Entry points for named-state ("variants") animation.
static VariantSet Variants(this VisualElement element)static TweenSequence To(this VisualElement element, string state)VariantSet class Pro
Framer-Motion-style named states for an element. Define states with State, then animate between them with To. Interruption-safe, a new To cancels the previous transition.
VariantSet State(string name, Action<VariantState> build)build callback.TweenSequence To(string name)VariantState class Pro
One named visual state in a VariantSet, a target look (any of scale / opacity / translate / rotation / background color) plus its timing. Only the properties you set are animated.
VariantState ScaleTo(float scale)VariantState FadeTo(float opacity)VariantState MoveTo(Vector2 translate)VariantState RotateTo(float degrees)VariantState ColorTo(Color background)VariantState In(float duration)VariantState With(EaseFunction ease)VariantState WithSpring(SpringPreset preset)VariantState WithSpring(SpringConfig config)VariantState WithResponse(float response, float bounce = 0f)response = period in seconds, bounce = arrival character); full model on FromResponse.Settings and accessibility
MotionSettings class Lite
Global Cascade settings. The headline one is Mode, wire it to the OS "reduce motion" accessibility setting (or a user toggle).Reduced keeps animation but calms it, Crossfade replaces movement with fades, None snaps instantly. Opt a single animation out with element.Animate()…IgnoreReducedMotion().
static MotionMode ModeMotionMode. Applied per-channel when a sequence dispatches; opt a single essential animation out with element.Animate()…IgnoreReducedMotion(). Mode changes affect animations dispatched AFTER the change (in-flight animations keep their constraints).static bool ReduceMotionstatic MotionManifest Describe()static MotionStats StatsMotionMode enum Lite
Graded motion accessibility (WCAG 2.3.3 "Animation from Interactions"). Set via Mode; applied per-channel when a sequence dispatches.
FullReducedCrossfadeNoneReduceMotion = true behavior).MotionChannel enum Lite
Which style property an engine-driven ("value-mode") tween animates, the identity used for velocity handoff, channel supersede, and per-channel cancel (element.StopAnimations(MotionChannel.Opacity)).
CustomOpacityTranslateXTranslateYScaleRotateWidthHeightTopLeftMotionStats struct Lite
A cheap, read-only snapshot of Cascade's live engine load, for a debug HUD, a perf test, or just confirming animations actually stop. Read it via Stats. Counting is O(active sequences) and allocation-free.
readonly int ActiveRunnersIPanel) that currently have a running Cascade ticker.readonly int ActiveSequencesreadonly int ActiveTweensreadonly int PooledTweensJSON sequences and presets
SequencePreset class Pro
Declarative JSON round-trip for SequencePreset, a stable, constrained schema an external tool (an AI assistant, a code generator, a content pipeline) can emit to describe an animation, which Cascade then validates and plays. This is the "AI-first" front door: emitting constrained JSON is far more reliable for a language model than generating freeform C#. Format and copy-paste examples.md. Machine-readable schema.schema.json.
TweenSequence Play(VisualElement element)element. Returns the handle.static SequencePreset FromJson(string json)SequencePreset instance. Throws ArgumentException with a human-readable message on any invalid input, use TryFromJson in tooling/AI loops that want to recover and self-correct. JSON shape.{ "steps": [ { "actions": [ { "verb": "...", ... } ] } ] }, steps run in sequence, actions within a step run in parallel. Verbs: Fade, MoveX, MoveY, MoveTo, Scale, Rotate, SlideIn, BackgroundColor, TextColor, Width, Height, Size, Top, Left. Float verbs take "to"; MoveTo/Size take "x" and "y"; color verbs take "color" (e.g. "#FF8800"); SlideIn takes "edge" (Left/Right/Top/Bottom) and "distance". Shared."duration" (seconds), "delay", and either "ease" (e.g. OutCubic, OutBack, Linear) or "spring" (Gentle/Snappy/Bouncy, which overrides ease). Full vocabulary and prompt→animation examples.md.static bool TryFromJson(string json, out SequencePreset preset, out string error)preset is a fresh instance and error is null. On failure, preset is null and error describes the problem (e.g. "step 0, action 1: verb 'Fade' requires a numeric \"to\"") so a generator can fix its output. For an AI/codegen self-correction loop that wants to branch on the failure and apply a fix, pre-check with Validate, which returns a structured MotionError (code + offending field path + nearest-name suggestion). Note: the returned preset is a ScriptableObject the caller owns, to just check validity in a loop without allocating, use Validate.static bool Validate(string json, out string error)error says why (same messages as TryFromJson). For the machine-readable form (code + field path + suggestion) use Validate.static MotionError Validate(string json)MotionError, the self-correction entry point for AI/codegen loops. Returns None (whose IsError is false) when the JSON is valid; otherwise a struct carrying the Code, the offending Path (steps[0].actions[1].to), the human message, and a Suggestion (e.g. "FadeIn" → "Fade"), so the caller can apply the fix instead of guessing it. Allocates no preset.static TweenSequence PlayJson(VisualElement element, string json)element in one call (no asset needed). Throws on invalid JSON; catch or pre-validate with Validate.string ToJson(bool pretty = true)FromJson accepts. Round-trips.FromJson(p.ToJson()) reproduces an equivalent preset (numbers preserved to 6 decimals). Emits only the fields each verb uses; null actions are skipped (matching playback).static List<MotionAdvice> Lint(string json)Validate in an AI/codegen loop. Why this exists. Verbs animate to a value and read from the live one, so {"verb":"Fade","to":1} on a visible element is a legitimate no-op. It parses. It validates. It does nothing. A generator told only "MotionError.None" has no way to learn that its entrance never appeared, measured on this package's own documentation, six of fourteen shipped examples had exactly this defect and four did nothing whatsoever. Advisory, never fatal: an element genuinely hidden by USS is a real case, and Validate keeps answering only "will this parse and run". Returns an empty list for valid-and-sensible JSON, and also for JSON that does not parse, linting is a second opinion on something already valid, so check Validate first.List<MotionAdvice> Lint()static string LintSummary(string json)null when there is nothing to say, the shape a console warning or an AI's next prompt wants.MotionError struct Pro
A structured validation failure from the JSON front door, returned by Validate (which gives None when the JSON is valid). The Code lets a generator branch, Path points at the exact offending field (steps[0].actions[1].to), and Suggestion offers a nearest-name fix ("FadeIn" → "Fade"), turning "guess the fix" into "apply the fix". The out string overloads of TryFromJson and Validate return just the Message.
readonly MotionErrorCode Codereadonly string Pathsteps[0].actions[1].to. Empty for a whole-document failure (empty/invalid JSON).readonly string Messagereadonly string SuggestionMotionError(MotionErrorCode code, string path, string message, string suggestion = null)bool IsErrorNone).static MotionError NoneMotionErrorCode enum Pro
A machine-readable category for a JSON-sequence validation failure. Pairs with the human message so an AI/codegen loop can branch on the failure instead of regex-ing a string.
NoneEmptyJsonInvalidJsonMissingFieldUnknownVerbMotionVerb.UnknownEaseEaseKind.UnknownSpringSpringPreset.UnknownEdgeEdge.NotFiniteOutOfRangeInvalidColorMotionAdvice struct Pro
One thing a linter noticed about a sequence that is nonetheless valid. Advisory: the JSON parses, and it will run. It just may not do what whoever wrote it meant.
readonly MotionAdviceCode Codereadonly string PathPath uses (steps[0].actions[1]), so a generator can address the exact action.readonly string Messagereadonly string SuggestionMotionAdvice(MotionAdviceCode code, string path, string message, string suggestion)MotionAdviceCode enum Pro
Kinds of advisory Lint can report.
Nonedefault(MotionAdvice) is meaningful. Matches None.NoOpActionfrom. Overwhelmingly this is an entrance that forgot to say where it starts.DurationIgnoredduration and spring. A spring is driven by its own physics and never reads the duration, so the number is inert, and reads as if it controlled the timing, which is the misunderstanding worth catching.FieldIgnored"from" on a verb with no float target (SlideIn, MoveTo, Size, the colour verbs). It parses and is then discarded, which for a self-correcting API is worse than rejecting it.TransitionPreset class Pro
An asset (Create ▸ Cascade ▸ Transition Preset) holding an enter/exit transition for the UI Animator component or for code: preset.ToTransition().
bool fadebool slideEdge slideEdgefloat slideDistancebool scalefloat scaleFromfloat durationbool useSpringEaseKind easeSpringPreset springTransition ToTransition()Transition this preset describes.InteractionPreset class Pro
An asset (Create ▸ Cascade ▸ Interaction Preset) holding a hover, press or focus look for the UI Animator component or for code: preset.Apply(element, trigger).
bool scalefloat scaleActivebool fadefloat fadeActivebool rotatefloat rotateActivefloat durationEaseKind easeInteraction Apply(VisualElement element, InteractionTrigger trigger)element for the given trigger.Effects
DropShadowElement class Pro
A soft drop shadow or outer glow drawn with a mesh: no shaders, works in any render pipeline. Put the element you want shadowed inside it as a child. For a glow, set both offsets to 0 and use a bright color with more spread. Usable from UXML as <Cascade.DropShadowElement>.
Color shadowColorfloat blurfloat spreadfloat offsetXfloat offsetYDropShadowElement()FilterEffects class Pro
Animated USS filter effects, BlurTo and TintTo as fluent verbs on Unity 6.3+ (where UI Toolkit ships the filter pipeline). Opt-in and measured: a filter repaints the element through a post-processing pass every frame it animates, profile on target hardware. On older Unity versions the verbs compile but no-op with a one-time warning, so shared code stays portable. Coexists with (does not replace) the mesh-based DropShadowElement; backdrop blur is intentionally NOT offered.
static TweenSequence BlurTo(this TweenSequence seq, float toRadius, float duration)filter: blur() radius (px) to toRadius over duration seconds. Captures the current radius at start (0 if none); other filter functions already on the element are preserved.static TweenSequence TintTo(this TweenSequence seq, Color to, float duration)filter: tint() color to to over duration seconds. Captures the current tint at start (white = identity); other filter functions already on the element are preserved.