Skip to content

UI Screen Space

Updated

Pins a panel to the screen as a HUD.

Type
comp-ui-screen-space
Script class
UIScreenSpaceComponent
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.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
insetX -16384 ≤ x ≤ 16384
insetY -16384 ≤ x ≤ 16384
screenScale 0.001 ≤ x ≤ 100

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(UIScreenSpaceComponent);
if (component) log(component.props);
}