Instantiate Prefab within a public gameobject Parent

Hi guys, here is my problem.
In order to make an enemy respawn, I’ve got a parent gameobject “Spawner” wich contain a script that instantiate the enemy prefab when the first one (the actual enemy stored in a public gameobject of spawner) is missing ( destroyed by player).

The thing is, once the player kills enemy, he’s always missing from the Spawner, so Spawner instantiate infinity of enemies…I need to instantiate the newprefab IN the spot that the precedent one used to be in (public gameobject of the spawner script) so once Spwaner created a new prefab, it’s not missing until it’s destroy once again…I really can’t figure it out !

Any help would be much appreciated !!!
Thx guys.

You could have a list on the spawned script & when the enemy is created add it to the list by putting the code in the enemy start script to add it. When the enemy is destroyed remove it from the list. Then have an if statement that says if the # of enemies in the list is <1 instantiate a new one (& when it is instantiated it will populate the list)

Sounds like a good idea, I’m pretty bad at arrays for the moment, but maybe it’s time to get to work then ! ^^