public void GenerateAsteroids() { asteroids = new List <GameObject>(); for (int i = 0; i < nAsteroids; ++i) { GameObject obstacle = DynamicPool.instance.GetObj(DynamicPool.objType.Asteroid); asteroids.Add(obstacle); curve.AddObstacleToCurve(obstacle, Obstacle.obstType.Mesh); } }