How to save random objects locations

public GameObject TilePrefab;
public GameObject DoorTilePrefab;
public GameObject currentTile;

public int e;

GameObject prefab = null;

int randomIndex;

void Start () 
{

	for (int i = 0; i < e; i++)
	{

		if (i == e - 1) //check if it is the last tile to spawn
		{
			SpawnTile(true);   //if so spawn a doorTilePrefab instead of a regular prefab

		}
		else
		{

			SpawnTile(false);    //spawn regular prefab

		}

	}

}
public void SpawnTile(bool isDoor)
{
	randomIndex = Random.Range(0, 2);
	prefab = null;
	if (isDoor)
	{
		prefab = DoorTilePrefab;

	}
	else
	{
		prefab = TilePrefab[randomIndex];

	}
	currentTile =(GameObject)Instantiate (prefab, currentTile.transform.GetChild (0).transform.GetChild (randomIndex).position, Quaternion.identity);

}

}

public GameObject TilePrefab;
public GameObject DoorTilePrefab;
public List positions;
public GameObject currentTile;
public int e;
GameObject prefab = null;
int randomIndex;
void Start ()
{
positions = new List();

     for (int i = 0; i < e; i++)
     {
         if (i == e - 1) //check if it is the last tile to spawn
         {
             SpawnTile(true);   //if so spawn a doorTilePrefab instead of a regular prefab
         }
         else
         {
             SpawnTile(false);    //spawn regular prefab
         }
     }
 }
 public void SpawnTile(bool isDoor)
 {
     randomIndex = Random.Range(0, 2);
     prefab = null;
     if (isDoor)
     {
         prefab = DoorTilePrefab;
     }
     else
     {
         prefab = TilePrefab[randomIndex];
     }
     
     Vector3 position = currentTile.transform.GetChild (0).transform.GetChild (randomIndex).position;
 
     positions.Add(position);

     currentTile =(GameObject)Instantiate (prefab, position , Quaternion.identity);
 }

How to save the locations of all random objects and retrieve them in ButtonLoad .

public GameObject TilePrefab;

public GameObject DoorTilePrefab;

public List positions;

public GameObject currentTile;

public int e;

GameObject prefab = null;

int randomIndex;

void Start ()

{

positions = new List();

for (int i = 0; i < e; i++)

{

if (i == e - 1) //check if it is the last tile to spawn

{

SpawnTile(true); //if so spawn a doorTilePrefab instead of a regular prefab

}

else

{

SpawnTile(false); //spawn regular prefab

}

}

}

public void SpawnTile(bool isDoor)

{

randomIndex = Random.Range(0, 2);

prefab = null;

if (isDoor)

{

prefab = DoorTilePrefab;

}

else

{

prefab = TilePrefab[randomIndex];

}

Vector3 position = currentTile.transform.GetChild (0).transform.GetChild (randomIndex).position;

positions.Add(position);

currentTile =(GameObject)Instantiate (prefab, position , Quaternion.identity);

}

public void ButtonLoad ()

{

// Retrieve the locations of all random objects

}