find component in parent unity code example
Example: parent unity
public gameobject player
public gameobject Newparent
player.transform.parent = newParent.transform;
public gameobject player
public gameobject Newparent
player.transform.parent = newParent.transform;