Skip to content

Decal

Updated

Stamps an image onto every surface inside its box, like a sticker.

Type
comp-decal
Script class
DecalComponent
Per entity
One
Version
2.0.0

Read about it in Decals: 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
color "#ffffff"
opacity 1 0 ≤ x ≤ 1
type "fixed"

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