public void CreateBoids(int boidCount) { for (int i = 0; i < boidCount; i++) { SimpleVehicleModel boid = Instantiate(boidPrefab).GetComponent <SimpleVehicleModel>(); boid.gameObject.name = string.Format("Boid #{0}", i.ToString()); boid.Initialize(); boid.transform.position = cellGrid.GetRandomCell_ObstacleFree(0).transform.position + new Vector3(0f, 0.5f, 0f); boids.Add(boid); } }