Skip to content

Spawn Point

Updated

Marks where the player enters the scene. With several, one is picked by priority each time the player joins.

Type
comp-spawn-point
Script class
SpawnPointComponent
Per entity
One
Version
2.0.0

Read about it in Spawn points: 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
priority 0.1 ≤ x ≤ 1
radius 0 ≤ x ≤ 100
slots 1 ≤ x ≤ 256, integer

Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.

  • SpawnPoint::place

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