UI Progress
Updated
Progress bar or ring.
- Type
comp-ui-progress- Script class
UIProgressComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Controls: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
margin |
||
margin[] |
- |
|
max |
- |
|
min |
- |
|
padding |
||
padding[] |
0 ≤ x ≤ 16384 |
|
size |
0 ≤ x ≤ 16384 |
|
value |
- |
Events
Section titled “Events”Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.
UIProgress::change
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
A loading barA UI Progress bar that first sweeps while the wait is unknown, then fills from 0 to 100% with a tween, with a status label beside it.
Watch the bar sweep while it connects, then fill. Run the example again to replay it. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(UIProgressComponent); if (component) log(component.props);}