IndeterminateProgress
IndeterminateProgress makes a Unity ProgressBar show a bar that runs from the left to the right again and again. Use it for work of unknown length, as ProgressRing with indeterminate.

How to make a progress bar indeterminate:
<ui:ProgressBar name="loading" title="Loading…" />
var loading = root.Q<ProgressBar>("loading");
IndeterminateProgress.Set(loading, true);
// The length is known now: show the value again
IndeterminateProgress.Set(loading, false);
loading.value = 40;
| Member | Description |
|---|---|
IndeterminateProgress.Set(bar, indeterminate) |
Starts (true) or stops (false) the moving bar. A second call with the same state does nothing. |
IndeterminateProgress.USS_CLASS |
tb-progress-bar--indeterminate. It is on the progress bar while the bar moves. |
- The moving bar takes 1.4 s for one run. It starts outside the left end and leaves at the right end.
- The fill of the value is hidden while the bar moves. The value and the title stay, and the title draws over the moving bar.
- The move runs on the element scheduler, so it stops while the progress bar is off the panel.
- The class alone does not move the bar: USS has no animation. Call
Setalso for a bar that has the class in UXML. - It works with each
AbstractProgressBar, in and outside anWorkspace.
Tips:
- Use it when you cannot give a percent, such as a wait for a server. Change to the value when you know the length.
- For a small busy sign in a row or a button, use a ProgressRing.
Styling
| Class | Element |
|---|---|
tb-progress-bar--indeterminate |
The progress bar while it is indeterminate. Its unity-progress-bar__background clips the moving bar, and its unity-progress-bar__progress is hidden. |
tb-progress-bar__runner |
The moving bar, in --tb-color-accent. Its width (30%) is its length. |
To make the moving bar short and green:
.tb-progress-bar__runner { width: 15%; background-color: var(--tb-color-success); }