finding main parent gameobject recursively from child?

Hi guys, im totally stumped on this, done a search too.

Say i have a gameobject and various children gameobjects with scripts, how would i find the parent gameobject at the top of the hierachy eg

GameObject_parent
------------------childA
-------------------------childA1
------------------childB
-------------------------childB1
------------------childC
-------------------------childC1
-------------------------childC2
-------------------------childC3
--------------------------------childC3_1

How would i find GameObject_parent from a script on childC3_1 without exposing it in the inspector and just dragging onto it.

ps sorry if its been answered before, just recovering from a bit of brain damage :frowning:

Transform.root

1 Like

that simple :smile: thanks