UI List
Updated
Scrolling list of selectable rows.
- Type
comp-ui-list- Script class
UIListComponent- Per entity
- One
- Version
- 1.0.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 |
|---|---|---|
scrollbar |
0 ≤ x ≤ 16384 |
Events
Section titled “Events”Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.
UIList::selectUIList::deselect
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Choosing a level from a listA UI List of levels with icons and a locked row: selecting a row enables the Play button, and Play loads the scene whose id is the row's value.
Pick a level in the list, then press Play to load its scene. Frozen Peak is disabled. Run the example again to choose another level. Drag outside the panel 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(UIListComponent); if (component) log(component.props);}