API Reference › Tiled › Tiled.spawn
method

Tiled.spawn

Tiled.spawn(map, object, model: string) -> int

Opt-in: spawns an entity of model from an object — its Position (if the model has one) takes the object's x/y, and each object custom property sets a like-named int/bool component field through the reflection ABI. Returns the entity, or -1 if the model is unknown. The core load never calls this.

← All symbols