TileMap doesn't update its size when you erase an entire row or col.

When you create a map with any size and erase it’s rows or cols to reduce it’s width or height sizes, the tilemap.cellBounds keep returning it’s previous size.

  • 1 map size (10x8)
  • 2 you remove one map’s rows so now the map size is (10x7)
  • 3 map.cellBounds returns (10x8) instead of 10x7

How to fix that or is there another way to get the map size?

Thanks!

I encountered the same problem. This might be your solution:
https://forum.unity.com/threads/tilemap-bounds-bug.499738/