Skip to content

Kit Piece

Updated

Places one piece chosen from a modular building kit.

Type
comp-kit-piece
Script class
KitPieceComponent
Per entity
One
Version
1.0.0

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

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

  • KitPiece::ready
  • KitPiece::error

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