You can get the currently used tiles using get_used_cells()
, which will tell you what tile is in each used location. With that information you can manipulate the cells, changing tiles, deleting them, detecting certain tile types, etc.
However, you are making an incorrect assumption about TileMaps and TileSets. The tiles are not "nodes", at least not in the sense you seem to be thinking. A TileSet is a Resource
type. It's a bunch of data defining a texture and attached collision/occluder/nav information linked to a unique id.
The purpose of a TileMap is exactly the opposite of placing a whole bunch of individual nodes. When a TileMap is used, all of the drawing and collisions are batched together to create a single object. For example, when you collide with a TileMap, you don't collide with a tile; instead there is a single collider for the whole map. This is much more efficient at runtime.
There are methods for accessing the TileSet, such as tile_set_texture()
. See here: http://docs.godotengine.org/en/3.0/classes/class_tileset.html
But again, it's not as straightforward as them all being separate "nodes" and what you can do with them is limited.