Hello ![]()
I have some game object, I am able to find all child game objects and modify them.
But how can I add new child object?
Hello ![]()
I have some game object, I am able to find all child game objects and modify them.
But how can I add new child object?
GameObject parent;
GameObject go;
// Attach go as a child to parent.
go.transform.parent = parent.transform;
To create a new gameobject dynamically do this
GameObject go = new GameObject();
This is C# ofc.
thx - it is working!!! ![]()
Some how strange - I have to use transform in order to get and add child game objects. But obviously it have to be so ![]()