|
Now I know it may be out there, but I cannot find a good example or specifics on how to reduce my draw calls for the below mentioned code: ArrayList road; float difficulty; // Use this for initialization void Start () { difficulty = 20f; road = new ArrayList(); for (int i = 1; i < 5; i++) { for (int j = 0; j < 21; j++) { Transform temp = (Transform)Instantiate(brick, new Vector3(-2.5f+i,0,0.5f+j), Quaternion.identity); road.Add(temp); } } for (int i = 1; i < 5; i++) { for (int j = 0; j < 21; j++) { Transform temp = (Transform)Instantiate(brick, new Vector3(-2.5f+i,3.05f,0.5f+j), Quaternion.identity); road.Add(temp); } } for (int i = 1; i < 4; i++) { for (int j = 0; j < 21; j++) { Transform temp = (Transform)Instantiate(brick, new Vector3(-2.05f,-0.45f+i,0.5f+j), Quaternion.identity); //temp.transform.localScale = new Vector3(.25f,1,1); temp.transform.Rotate(Vector3.forward * 90); road.Add(temp); } } for (int i = 1; i < 4; i++) { for (int j = 0; j < 21; j++) { Transform temp = (Transform)Instantiate(brick, new Vector3(2.05f,-0.45f+i,0.5f+j), Quaternion.identity); //temp.transform.localScale = new Vector3(.25f,1,1); temp.transform.Rotate(Vector3.forward * 90); road.Add(temp); } } } I have tried assigning a parent object with the combine children script and it did not work. Sorry for the newbie question.
(comments are locked)
|
|
(comments are locked)
|
