Skip to content

Text

Updated

Crisp, cheap flat text label in the world.

Type
comp-text
Script class
TextComponent
Per entity
One
Version
1.1.0

Read about it in Text: 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
fontSize 0.001 ≤ x ≤ 10000
letterSpacing -10 ≤ x ≤ 10
lineHeight -10 ≤ x ≤ 10
maxWidth 0 ≤ x ≤ 10000
outlineWidth 0 ≤ 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(TextComponent);
if (component) log(component.props);
}