Spawn A Random Prefab

I’d like to spawn a random prefab from a selection of prefabs, every few seconds. The spawn point for the prefabs will be the same every time. Is there a simple way to do this?

Make a list of prefabs then

Write a coroutine like this

public static class IListExtensions
{
    private static System.Random random = new System.Random();

    public static T RandomElement<T>(this IList<T> list)
    {
        return list[random.Next(list.Count)];
    }
}

 IEnumerator RandomPrefabSpawner()
    {
        GameObject go = prefabList.RandomElement();
        //instantiation Code of random gameobject fetched(go)
        yield return new WaitForSeconds(waitTime);
    }

What you can do is make an array of the prefabs you want to spawn and then choose a random index in the array and use instantiate() to spawn a random prefab !!