Search Unity

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

Discussion in '2D' started by Dunkelheit, Jan 29, 2018.

  1. Dunkelheit

    Dunkelheit

    Joined:
    Sep 3, 2013
    Posts:
    81
    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 the 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!