UI Panel
Updated
Background box of an element: fill, rounded corners, border.
- Type
comp-ui-panel- Script class
UIPanelComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Panels and layout: 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 |
|---|---|---|
borderRadius |
||
border |
0 ≤ x ≤ 16384 |
|
borderWidth |
||
borderWidth[] |
0 ≤ x ≤ 16384 |
|
opacity |
0 ≤ x ≤ 1 |
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 notification of your own designA script defines a shop notification built from UI entities, with Buy and Cancel buttons that answer it.
Press Open shop, then Buy or Cancel in the panel that appears.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(UIPanelComponent); if (component) log(component.props);}