Hi, want to generate 100*100 objects in my scene, in the editor.
I have my code to generate them at runtime, but its done using coroutine, and coroutine won’t work in edit mode.
//So I have something like that for runtime
IEnumerator Generate()
{
for(int x = 0 ; x < 100 ; x ++)
{
for(int y = 0 ; y < 100 ; y ++)
{
GameObject o = new GameObject("object");
o.transform.position = new Vector3(x,y,0);
}
yield return null;
}
}
Did someone already face the same problem and have a solution ?
How can I generate my objects not in one big frame that’ll freeze my unity ?
Thanks