Two options:
1. Loop through all tiles and check if they are empty.
2. Get Tilemap.TilesJSON of an empty tilemap and save it to a variable. When you need to check if a tilemap is empty, compare its TilesJSON with that string saved in the variable.
For example, the JSON of an empty tilemap may look like this:
> {"c2tilemap":true,"width":53,"height":30,"data":"1590x-1"}
But in your case it may be different.
Hey
I made the code to detect if the TielMap is empty and then delete the TileMap but for some reason if the TileMap is all complete and missing some tile in some frame then it is destroyed, I need it to detect if the tilemap is completely empty to then destroy it
This is the code I'm using to detect if the TileMap is completely empty
+ System: for "y" to 0 a floor(TileMap.Height÷16)-1 + System: for "x" to 0 a floor(TileMap.width÷16)-1 + TileMap: tile (loopindex("x"), loopindex("y")) = -1 -> TilesMap: Destroy