unity reference parent gameobject

C#
transform.parent.gameObject //Use this to reference the parent of the gameobject
Source

Also in C#: