Skip to content

Class: ProgressBarComponent ​

A display-only bar (Cocos's ProgressBar): bar (a child) shows progress of the host's track — cropped if it's a Sprite with a fill type (horizontal / vertical), else resized along the track. ProgressBarSystem applies it every frame, edit mode included.

Extends ​

Constructors ​

Constructor ​

ts
new ProgressBarComponent(): ProgressBarComponent;

Returns ​

ProgressBarComponent

Inherited from ​

Component.constructor

Properties ​

PropertyModifierTypeDefault valueInherited from
barpublicnumber | nullundefined-
directionpublicUIFillDirectionundefined-
dirtypublicbooleantrueComponent.dirty
enabledpublicbooleantrueComponent.enabled
progresspublicnumberundefined-

Methods ​

SetBar() ​

ts
SetBar(target): void;

Parameters ​

ParameterType
targetnumber | Entity | null

Returns ​

void

© 2026 PlayAdGentic