Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

how to arrangement child objects using c#

$
0
0
i have a gameobject that have a group of plane meshes that created randomly as child every one of this planes have a "2f" offset in x axis between every plane what i wanna do is i wanna make the parent object arrangement the child objects on rows and columns even if one of this child deleted during the game or added so if i have 8 planes mesh it should look like that 2 rows and 4 columns like that but i don't know how to do that ? ![alt text][1] [1]: /storage/temp/119504-untitled-2.png i know how to get child objects and making offset but i do't know how to get the format like that in the image i wanna to arrangement the planes meshes that i can acces from this for loop void Update(){ Transform[] children = new Transform[transform.childCount]; //Debug.Log(transform.childCount); for (int i=0; i

Viewing all articles
Browse latest Browse all 302

Trending Articles