Hello all,
I am trying to parent all the gameobjects in an array to a single parent. I have got all the objects in an array via
GameObject.FindGameObjectsWithTag
and now I want to change the parent of all of them. I tried doing this by getting the array
(var parts : GameObject )
and then using parts.transform.parent == parentobject.transform.
I wasn’t expecting this to work, but I did try it. I then set up a system where Unity loops, and parents the gameobjects together. This worked, but with the large number of objects in the array that needed parenting, this is taking 10-20 seconds. I need this to happen in a single frame. Does anyone have an idea on how to do this?
javascript only, please
thanks