Hierarchy question


I'd like to create children of a GameObject through instantiate, but i have no clue whether it is possible or not.

Im using code below:

Company is filled with a prefab in the editor. The objCompany instances of this Prefab would preferably be children of the GameObject this script is attached to, but they are created as seperate gameobjects.

Any clues?

Thx B

var Company : Transform;
var numCompanies=5;

var objCompany = new Array(Transform,Transform,Transform,Transform,Transform,Transform,Transform,Transform,Trans  form,Transform);

function Awake() 
    for (var i=0;i<numCompanies;i++)

It is possible to set parenting in a script using transform.parent, by adding in something like this

    objCompany*.parent = transform;*