Finding Highest Level Parent of an Object

Hi,

I know it’s pretty easy to get the parent of the current object, but what if you have a hierarchy of parents: How do I find the parent of the parent of the parent of the parent, etc., in other words the highest level parent of the current object?

1 Answer

1

Use transform.root to get the root of the hierarchy tree.

Awesome, thanks =)