Replace Tile
Replaces matching tiles in a tilemap with weighted random variants.
Use this to add small visual variations to walls, floors, or props without building a new rule tile.
Parameters
| Field | Description |
|---|---|
| Tilemap | The target Tilemap. |
| Bounds | Optionaly restrict replacement to a region. Uses the tilemap’s full cellBounds if empty. |
| Match Tile | Only cells containing this tile (by reference) will be considered. |
| Keep Original | Relative weight for keeping the original tile, compared to the total weight of all variants. |
| Variants | Weighted list of possible replacement tiles. |
How it Works
- Scans each cell in the chosen bounds.
- When the cell’s tile matches Match Tile, the action draws from Variants using their relative weights.
- The selected variant is applied in a single SetTiles batch for speed - no explicit refresh required.
Tips
- To remove some tiles entirely, include a
None(empty) entry in Variants. - You can also match on null to replace empty tiles.
- Combine several Replace-Tile actions to decorate a map in stages (e.g., cracks, moss, decals).