I’ve been trying to create a basic random asteroid field out of spheres and it was going so well until I realized that it never stopped generating. I used a while loop and made a variable representing the iterator (i) and did some code inside of it. I ended the while loop with an i++; but when i tested it, it didn’t seem as if the iterator increased. My code: `using UnityEngine;
using System.Collections;
public class AsteroidGeneration : MonoBehaviour {
%|-1008245593_1|%
public int objectCount;
%|10977004_2|%
%|1407053197_4|%
%|61866010_5|%
%|-1777223416_6|%
%|1768835771_7|%
Vector3 ranV = new Vector3 (Random.Range(0,spread), Random.Range(0,spread), Random.Range(0,spread));
%|-1190291132_9|%
%|-709725649_10|%
%|-1464503037_11|%
%|-1745120846_4|%
%|468739861_13|%
}`
I cant seem to solve this problem. Any help is appreciated!
If there is a problem with you seeing the code, here’s a picture: