Hi!
I have a problem with tilemap.
Sometimes my tilemap size increasing to infinity size.
here screenshot of scene with rect tool selected.


i made a script to check tilemap size

    Tilemap tilemap = GetComponent<Tilemap>();
    Vector3Int size3 = tilemap.size;

    Debug.Log("x :" + size3.x.ToString());
    Debug.Log("y :" + size3.y.ToString());
    Debug.Log("y :" + size3.z.ToString());

and log is
147279-u02.png

so i made this

  [ExecuteInEditMode]
    for (int i = 500; i <= 2000000; i++)
        {
            for (int j = -350; j < 300; j++)
            {
                tilemap.SetTile(new Vector3Int(i, j, 0), null); 
            }
        }

and it deleted all tiles in range, but size still this huge.
There is a possibility to change size of tilemap? Because, i thing, it’s all empty space now, except part that I don’t deleted.

keke, i found it!
i spend 2 days on it, but found solution in 20 minutes after ask question :slight_smile:
just need to

tilemap.CompressBounds();

after deleting unwanted tiles