Uncategorized

Unity3D: How to make one GameObject transform a child of another

Unity3D: How to make one GameObject transform a child of another

In Unity3D, you can create parent-child relationships in code as easily as you can create the heirarchies in the Unity3D editor.

All you need to do is set the child GameObject’s transform.parent property to the transform you want as the parent.

GameObject child = …

GameObject parent = …

child.transform.parent = parent;

Registered for GDC09

Registered for GDC09

We are registered for GDC09.  Hope to see you all there!

Also, if you use Twitter, I’m going to keep minor and day-to-day project updates there:

http://twitter.com/bakedon