hereditary scripting

I was wondering if/how it’s possible to instantiate an object as a child of another object.

I have an object “translating” itself at a steady velocity, and I need to be able to instantiate objects in a script which are children (so moving along with it) of the main object.

First you instantiate the object then you set the parent of the instantiated game object’s transform to be a different transform.

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

http://unity3d.com/Documentation/ScriptReference/Object.Instantiate.html

Thank you, works great.