Hi, I have probably quite a silly question but I am confused about something. A little while ago I created a loop where it would generate a ‘random’ number every x seconds while the game was running. To begin with I wanted it to start doing this at the start of the game or in the Start method so I wrote
private void start()
{
while(gameIsRunning){
StartCoroutine(NumberSpawner());
}
}
Anyways something like that. It broke the game of course. So I switched the while loop into the coroutine and it works. But here is my question from my understanding Start only gets called once thats why i put it in there to begin with. How can it create this forever loop?