Add child game object

Hello :slight_smile:

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;
1 Like

To create a new gameobject dynamically do this

GameObject go = new GameObject();

This is C# ofc.

thx - it is working!!! :slight_smile:
Some how strange - I have to use transform in order to get and add child game objects. But obviously it have to be so :slight_smile: