Seperate object in TileMap?

Hey,
i am creating a game similar to “worms” and i want to do destructible enviroment.
there is some good video here:

that show what i mean.
i used TileMap to create a simple map, is there any way to script specific object in the Tile so i can destroy it when a missle hit by using Gizmo?

thanks

Hi @maryuma888

Tilemap consists of tiles, and you can get and set those tiles runtime too.

Get location of your hit center, then get all the tiles around your hitpoint, then set those tiles to null.

See:

Can’t remember how and where this worked, but I used it at some point (from my notes):

tilemap.SetTile(tilemap.WorldToCell(hitPosition), null);

Edit:
This works just fine to remove a circular or square area.