RadialLoading is a VisualElement that paints an indeterminate spinning arc on a circular track — useful for "working…" states where you don't have a known end. For a determinate radial progress bar, see Radial ProgressBar.

Radial Loading

Setup

⚠️ Give it an explicit size. The element paints its own arc, so without width/height there is nothing to draw into and the spinner renders blank.

xml
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:luna="CupkekGames.Luna"> <luna:RadialLoading name="busy-spinner" arc-size="0.2" line-width="10" update-frequency="10" step="0.05" style="width: 64px; height: 64px;" /> </ui:UXML>

The control auto-starts its animation on construction — no C# is required to spin. Stop and restart explicitly via StopAnimation() / StartAnimation():

csharp
// Inside your PanelRenderer reload callback (PanelRenderer delivers the // visual tree asynchronously — don't query in Awake/Start): var spinner = root.Q<RadialLoading>("busy-spinner"); spinner.StopAnimation(); // e.g. once the work completes

Inspector (UxmlAttributes)

Radial Loading Inspector

AttributeTypeDescription
ArcSizefloatLength of the spinning arc as a fraction of the full circle (0–1, default 0.2). Tweens smoothly to new values.
LineWidthfloatStroke width in pixels (default 10).
UpdateFrequencylongFrame interval in milliseconds (default 10).
StepfloatHow far the arc rotates per frame (default 0.05).

CSS variables

VariableTargets
--radial-loading-track-colorThe full-circle track behind the arc.
--radial-loading-line-colorThe spinning arc itself.
css
.my-spinner { --radial-loading-track-color: rgb(60, 60, 60); --radial-loading-line-color: rgb(255, 100, 100); }

CSS classes

ClassApplied when
radial-loadingAlways.

API

Properties

PropertyTypeDescription
TrackColorOverrideColor?Forces a track color, bypassing USS variable. Set null to fall back to USS.
ProgressColorOverrideColor?Forces an arc color, bypassing USS variable.

Methods

MethodDescription
StartAnimation()(Re)starts the rotation scheduler.
StopAnimation()Pauses the rotation scheduler.

See also

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL