unity gameobject does not get parented code example Example: how to get parent gameobject in unity childObject.transform.parent.gameObject