If you don’t want to do it with coroutines and you don’t care that the new enemy could appear after some time you can do it with InvokeRepeating:
public GameObject monsterPrefab;
public float respawnCheckTime = 5.0f;
private GameObject clone;
void Start()
{
...
InvokeRepeating("RespawnEnemy", 0, respawnCheckTime);
}
void RespawnEnemy()
{
if (clone == null)
{
clone = Instantiate(monsterPrefab) as GameObject;
}
}
This will check every respawnCheckTime if the last enemy spawned is alive, if not it will isntantiate a new one. Pretty much what @BoredMormon code does but with InvokeRepeating instead of coroutines.