Hi guys i was wondering if there is a better way to do the following:
void Update()
{
if (this.count < this.max_count)
{
executeMehod();
executeMehod();
executeMehod();
}
}
void executeMehod()
{
//Do some stuff here. Spawn 200-300 sprites here
this.count++;
}
Basically, my problem is when I do a for loop in Start() the game seems to freeze for some time. so I loop through array from Update(), which is only as fast as the current FPS. But with the above code, I can loop through a array 3 times faster and the game doesn’t temporarily freeze,like when using a for loop. So is there a better way to do this?