Easy question: is there a simple way to access the parent (GameObject) of my current GameObject through script? Something like “GameObject.parent” (though that doesn’t exist)? I’ve been looking, but so far to no avail.
Thanks!
Easy question: is there a simple way to access the parent (GameObject) of my current GameObject through script? Something like “GameObject.parent” (though that doesn’t exist)? I’ve been looking, but so far to no avail.
Thanks!
gameObject.transform.parent.gameObject;
Transform handles the parenting.
great! thanks, Dman.