gameObject.transform.parent = new parent object.transformIs this what you were looking for? This changed the current object's parent to a new one.