How can I instantiate gameobjects from an array in a specific order?

Hey guys,

I know this should be rather simple, but for some reason I’m having a brain block. I just want to create an array, fill it with 3 objects, then instantiate them in order (0,1,2). So whichever object hits a platform first, instantiate 0, then second item hits platform, instantiate 1, then 2. Hope that makes sense. The simpler the better.

Something like this would instantiate in order already:

public class Spawner : MonoBehaviour
{
	public List<GameObject> prefabsToInstantiate;


	void Start()
	{
		if (prefabsToInstantiate != null)
		{
			foreach(var obj in prefabsToInstantiate)
			{
				Instantiate(obj, transform.position, Quaternion.identity);
			}
		}
	}
}

PS.: I just wrote in on a text file, it wasn’t in Unity, so it’s not tested for typos etc…