Q: Unity Tilemap get Vector3 world position from x and y indexes I am trying to understand Tilemaps, specifically I want to be able to get a Vector3 position using x, y indexes of the Tilemap. I see that you can get a TileBase array from the Tilemap, but there doesn't seem to be any actual data in it that gives me this information.
I also see that there is a TileData class, but I am not sure how to convert a TileBase into a TileData so that I can retrieve the position from it.
// This code block was gathered from another answer. 
BoundsInt bounds = tilemap.cellBounds;
TileBase[] allTiles = tilemap.GetTilesBlock(bounds);

for (int x = 0; x < bounds.size.x; x++) {
    for (int y = 0; y < bounds.size.y; y++) {
        TileBase tile = allTiles[x + y * bounds.size.x];

        if (tile != null) {
            Debug.Log("x:" + x + " y:" + y + " tile:" + tile.name);
            // How do I get the transform.position of the tile from
            // the x, y indexes?
        } else {
            Debug.Log("x:" + x + " y:" + y + " tile: (null)");
        }
    }
}

See my comment above:

"How do I get the transform.position of the tile from the x, y
  indexes?"


A: use this function to get TileData from Tile:
https://docs.unity3d.com/ScriptReference/Tilemaps.Tile.GetTileData.html
in case you have derived your own class from TileBase, override this function and return TileData:
https://docs.unity3d.com/ScriptReference/Tilemaps.TileBase.GetTileData.html
