# Reducing Draw calls?

 0 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: ``````public Transform brick; ``````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. more ▼ asked Jul 31 '12 at 12:07 AM heretic619 4 ● 2 ● 3 ● 4 add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

 0 http://forum.unity3d.com/threads/18596-Combine-children-of-runtime-instantiated-objects more ▼ answered Aug 01 '12 at 08:24 AM oxium 181 ● 6 ● 8 ● 10 add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

By Email: