Class CircularProgress
A circular progress indicator that represents loading or processing state.
Inheritance
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
[UxmlElement]
public class CircularProgress : Progress, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder, ISizeableElement
Remarks
CircularProgress is a visual indicator that displays progress in a circular format. It can be used to show the status of an operation, like loading content, processing data, or uploading files.
The component supports two variants: determinate and indeterminate. The determinate variant shows concrete progress with a specific value, while the indeterminate variant displays a continuous animation indicating an ongoing process without a specific completion percentage.
Use CircularProgress when you want to show progress in a compact, circular format. It's particularly useful in scenarios where space is limited or when you want to maintain visual harmony with circular design elements.
The component features customizable properties including inner radius, rounded corners, and color styling to match your application's design system.
Examples
Basic indeterminate circular progress. Creates a default circular progress with indeterminate animation.
<CircularProgress />
Determinate progress with custom styling. Creates a large determinate progress indicator with custom color and thickness.
<CircularProgress variant="Determinate" value="0.75" inner-radius="0.4" color-override="#2196F3" size="L" />
Progress with code-behind interaction. Demonstrates how to create and update a circular progress indicator programmatically.
var progress = new CircularProgress();
progress.variant = Progress.Variant.Determinate;
progress.value = 0.0f;
// Update progress value over time
float currentValue = 0f;
void UpdateProgress() {
currentValue = Mathf.Min(currentValue + 0.1f, 1f);
progress.value = currentValue;
}
Constructors
CircularProgress()
Default constructor.
Declaration
public CircularProgress()
Fields
ussClassName
The CircularProgress main styling class.
Declaration
public const string ussClassName = "appui-circular-progress"
Field Value
| Type | Description |
|---|---|
| string |
Properties
innerRadius
The inner radius of the CircularProgress.
Declaration
[CreateProperty]
[UxmlAttribute]
public float innerRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
GenerateTextures()
Generates the textures for the CircularProgress.
Declaration
protected override void GenerateTextures()