scene-write-editable-tilemap-layer-data
Write tile data to a specific region of an editable tilemap layer, updating only the necessary tiles without resending the whole layer.
Instructions
Write part of the tile data of an editable tilemap layer. This is useful to update a layer's data without having to send the whole layer data again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | The x coordinate of the top left corner of the data to write. | |
| y | Yes | The y coordinate of the top left corner of the data to write. | |
| data | Yes | The tile data to write to the layer. Each item is a tile ID, or -1 for an empty tile. The tile ID is a global ID that is computed by the index (starting from 1) of the tile in the tileset. If there are more than one tileset, then the global ID is computed by adding the length of each tileset. The data is a 2D array, where each inner array represents a row of tiles. | |
| layerId | Yes | The `id` of the editable tilemap layer to write to. An editable tilemap layer is also a game object, so you can use the `id` of the EditableLayer game object. | |
| sceneId | Yes | The `id` of the scene. The `id` is not the name of the scene, else a unique identifier is set in the scene data. You need to read the scene data to get the `id`. |