Skip to content

Background

Updated

Solid background color of the scene.

Type
comp-background
Script class
BackgroundComponent
Per entity
One
Version
1.0.0

Read about it in Environment and sky: what it does, how to use it from a script, and examples.

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(BackgroundComponent);
if (component) log(component.props);
}