TilemapComponentOptions
Defined in: tilemap/src/TilemapComponent.ts:22
Options for creating a TilemapComponent.
Properties
Section titled “Properties”keyPrefix?
Section titled “keyPrefix?”
optionalkeyPrefix?:string
Defined in: tilemap/src/TilemapComponent.ts:38
Override prefix used when auto-keying entities spawned from Tiled objects.
Defaults to mapKey. Set this when multiple instances of the same map need
distinct entity-key namespaces (e.g. instanced dungeons).
layer?
Section titled “layer?”
optionallayer?:string
Defined in: tilemap/src/TilemapComponent.ts:32
Render layer name. Default: “default”.
layers?
Section titled “layers?”
optionallayers?:string[]
Defined in: tilemap/src/TilemapComponent.ts:30
Which tile layers to render. Omit to render all.
optionalmap?:TiledMapData
Defined in: tilemap/src/TilemapComponent.ts:26
Parsed Tiled map data. Use only when you don’t have an AssetHandle. Save/load and auto-keys require mapKey or source.
mapKey?
Section titled “mapKey?”
optionalmapKey?:string
Defined in: tilemap/src/TilemapComponent.ts:28
Asset path to the Tiled JSON. Resolved via Assets.get. Save/load uses this.
source?
Section titled “source?”
optionalsource?:AssetHandle<TiledMapData>
Defined in: tilemap/src/TilemapComponent.ts:24
Asset handle for the map. Preferred — captures both the parsed data and the asset path.