Performance: Tilemap basics
MEDIUM IMPACT
This affects how quickly the game scene loads and renders tile-based maps, impacting frame rate and responsiveness.
Use tilemap.SetTilesBlock(bounds, newTilesArray) to update tiles in bulk.foreach (var tile in tilemap.GetTilesBlock(bounds)) { tilemap.SetTile(tile.position, newTile); }| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Individual tile updates | Many small updates | Many reflows | High paint cost | [X] Bad |
| Batch tile updates | Single bulk update | Single reflow | Low paint cost | [OK] Good |