Question by
unity_b7oILN1LxYT_YA · May 10, 2020 at 11:04 AM ·
transformprefabparentchildparent transform
how add child to multi gameobject
hi i don't know how i can create this type of action for ese: i have a gameObject i want to create child of multi gameobject with tags
public Transfrom box;
void Update() { // put the retrieved objects into an array GameObject [] objs = GameObject.FindGameObjectsWithTag ("test"); // Process array contents one by one foreach (GameObject obj in objs) {
obj.gameObject.transform.SetParent. = box;
}
}
Comment