Childing?

Is it possible to make an object a child of another object threw code?

Use transform.parent for this

Works perfectly. Now is there a way to unchild?

transform.parent = null

transform.parent = null;

Thanks, will try.