Skip to content

Progress Bar

Linear or radial progress indicator with customizable colors and optional label.

Modes

Linear progress (horizontal/vertical)

Mode = ProgressBarMode.Linear fills a bar along the axis set by FillDirectionLeftToRight, RightToLeft, TopToBottom, or BottomToTop. The bar takes whatever Width/Height you set on the parent.

Linear progress (horizontal/vertical)

Linear progress (horizontal/vertical)

Linear mode fills a bar along the axis set by FillDirection — horizontal or vertical.

On the AutoLayout Progress Bar component, set Mode to Linear. Set Fill Direction to BottomToTop and Value to 0.65.

Radial progress (circular arc)

Mode = ProgressBarMode.Radial renders a circular arc. Control it with StartAngle, Clockwise, and ArcRange (360 = full circle).

Radial progress (circular arc)

Radial progress (circular arc)

Radial mode renders a circular arc controlled by StartAngle, Clockwise, and ArcRange.

On the AutoLayout Progress Bar component, set Mode to Radial. Set Start Angle to 90, enable Clockwise, set Arc Range to 360, and Value to 0.75.

Inspector Setup

  1. Add AutoLayout Progress Bar to a GameObject with AutoLayout.
  2. Choose Linear or Radial mode.
  3. Set the initial value and customize colors.
FieldTypeDefaultDescription
ModeProgressBarModeLinearLinear or Radial
Valuefloat0Progress value (0-1)
Track ColorColorDark grayBackground track color
Fill ColorColorLight blueProgress fill color
Show LabelboolfalseDisplay percentage label
Label Formatstring"{0:0%}"Label format string

Linear Mode

FieldTypeDefaultDescription
Fill DirectionLinearFillDirectionLeftToRightFill direction

Radial Mode

FieldTypeDefaultDescription
Start Anglefloat90Arc start angle (0-360)
ClockwisebooltrueFill direction
Arc Rangefloat360Total arc range (0-360)

Code Usage

Build it in the Inspector (see Inspector Setup above), or from code with the Code API.

Runtime Updates

// Update value (fires OnValueChanged)
m_LinearBar.Value = 0.8f;
// Change colors
m_LinearBar.FillColor = Color.red;
m_LinearBar.TrackColor = Color.black;
// Toggle label
m_LinearBar.ShowLabel = true;
// Rebuild visuals (e.g., after switching mode)
m_LinearBar.Mode = ProgressBarMode.Radial;
m_LinearBar.RebuildVisuals();

Methods

MethodDescription
RebuildVisuals()Destroy and recreate children based on current mode

Properties

PropertyTypeDescription
ValuefloatProgress (0-1), clamped
ModeProgressBarModeLinear or Radial
TrackColorColorBackground track color
FillColorColorFill color
ShowLabelboolShow/hide percentage label
LabelFormatstringLabel format string
FillDirectionLinearFillDirectionLinear fill direction
StartAnglefloatRadial start angle
ClockwiseboolRadial fill direction
ArcRangefloatRadial arc range

Events

EventSignatureDescription
OnValueChangedAction<float>Fires when Value changes

Builder API

MethodDescription
.Value(float)Set initial value (0-1)
.FillColor(Color)Set fill color
.TrackColor(Color)Set track color
.ShowLabel()Enable percentage label
.LabelFormat(string)Set label format
.FillDirection(LinearFillDirection)Set linear fill direction
.StartAngle(float)Set radial start angle
.Clockwise(bool)Set radial direction
.ArcRange(float)Set radial arc range
.Capture(Action<AutoLayoutProgressBar>)Capture reference

Notes

  • The bar takes whatever Width/Height you set on the parent. There are no auto-defaults — set sizing explicitly before the .ProgressBar(...) call.
  • Label uses zero-GC SetText("{0}", value * 100f) internally.
  • Linear mode uses Image.Type.Filled with Horizontal/Vertical fill method.
  • Radial mode uses Image.Type.Filled with Radial360 fill method.
  • Changing Mode at runtime requires calling RebuildVisuals().
Docs for AutoLayout PRO v1.0.0 Changelog