For loop continues to instantiate even after it should be finished
for(float xx = 0;xx <= 10;xx += xSize) {
GridXAmount++;
for (float yy = 0;yy <= 10;yy += ySize) {
GridYAmount++;
Instantiate(gridprefab,new Vector3(xx,yy,0),Quaternion.identity);
}
}
Why doesn't it stop creating new gridprefabs even after xx and yy = 10?
Comment
... and are you sure you run this just once and not in Update() or such?