Skip to main content

Interface: UiProgressBarEcsComponent

Defined in: ui/components/ui-progress-bar-component.ts:42

A read-only fill indicator - health bars, loading bars, cooldowns. Unlike UiSliderEcsComponent, it has no UiInteractableEcsComponent counterpart and no onValueChanged event: value is meant to be driven entirely by game code (progressBar.value = hp / maxHp), which already knows when it changed and doesn't need to be told. Use createProgressBar for the common "track + fill" visual assembly, or build your own from these same pieces.

Extends​

Properties​

fill​

fill: number

Defined in: ui/components/ui-progress-bar-component.ts:15

The entity id of the fill visual - a child RectTransformEcsComponent stretch-anchored from the bar's left edge, whose anchorMax.x createUiProgressBarEcsSystem drives to track value every tick.

Inherited from​

UiProgressBarRequiredOptions.fill


maxValue​

maxValue: number

Defined in: ui/components/ui-progress-bar-component.ts:27

The value value maps to a full bar. Defaults to 1.

Inherited from​

UiProgressBarDefaultedOptions.maxValue


minValue​

minValue: number

Defined in: ui/components/ui-progress-bar-component.ts:24

The value value maps to an empty bar. Defaults to 0.

Inherited from​

UiProgressBarDefaultedOptions.minValue


value​

value: number

Defined in: ui/components/ui-progress-bar-component.ts:30

The bar's current value, clamped to [minValue, maxValue]. Defaults to minValue.

Inherited from​

UiProgressBarDefaultedOptions.value