scene-fill-editable-tilemap-layer-data
Fill a rectangular region of an editable tilemap layer with a specific tile ID. Use it to clear layers, paint backgrounds, or create level elements like floors.
Instructions
Fill a region of the tile data of an editable tilemap layer with a single tile ID. This is useful to do things like clear the layer (fill the full layer with a -1 tile), or to paint backgrounds, filling the layer with the background tile, or filling just a part of the layer like for making a floor, or any other level element.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | The x coordinate of the top left corner of the region to fill. | |
| y | Yes | The y coordinate of the top left corner of the region to fill. | |
| width | Yes | The width of the region to fill in tiles. | |
| height | Yes | The height of the region to fill in tiles. | |
| tileId | Yes | The tile ID to fill the region with. 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. | |
| layerId | Yes | The `id` of the editable tilemap layer to fill. 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`. |