I just want to spawn enemy automatically when the game run so I did this simple basic concept but its working without the spawn time function without spawn time enemy spawned on a given position but its spawned unlimited so I add time to it and if condition but after that when I run the game enemy not spawning. what is the problem?
Here my script.
Edited:
It is spawning the enemy on the given position I just figure out where my problem was but another problem raised after spawn time end and it equals the 0 and enemy game object spawned after that if I see in my hierarchy 100 of 1000 enemies spawning simultaneously and my game got stuck and I have to forcefully shut down my editor.
I want to spawn one enemy and then after given time one enemy and so on.