Adding instantiated object to empty GameObject

To help me learn Unity, I’m making a clone of space invaders. To save me from creating each enemy individually, I have a script that instantiates them from a prefab. Now, how do I add these newly created objects to an empty GameObject? I’d like to create a script that moves this GameObject side-to-side, but I can’t figure out how to make the enemies a child of the GameObject.

Thanks for any input.

instantiated.parent = theGameObject;

http://unity3d.com/Documentation/ScriptReference/Transform-parent.html

Thanks, that lead me in the right direction. The code that ended up working for me looks like the following (only slightly different from what you gave).

enemyClone.transform.parent = enemyParent;

Welcome Teilas, and good luck getting your Space Invaders game finished! If you complete it to your satisfaction, please upload it or post a link so we can all enjoy it. I personally am curious about what a Unity space invaders clone looks like!

Good luck ask any questions around here! :stuck_out_tongue: