UI Render View
Updated
Shows a small 3D scene inside the UI.
- Type
comp-ui-render-view- Script class
UIRenderViewComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Content: 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 |
|
height |
0. |
|
margin |
||
margin[] |
- |
|
padding |
||
padding[] |
0 ≤ x ≤ 16384 |
|
width |
0. |
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 turntable previewA character preview inside a panel: a UI Render View shows a UI Render Scene with its own camera and lights, and a Behavior turns the model in it.
Watch Amelia turn inside the panel: she lives in the render scene, lit by its own lights. 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(UIRenderViewComponent); if (component) log(component.props);}