Unity offers a number of helper methods to help navigate the hierarchy. Methods like GetComponentsInChildren<> can be quite useful. Especially when you are spawning lot's of dynamic objects that are affected by parent transforms. For example, imagine a platform gameobject that moves around. You can easily spawn objects (creatures?) on to the platform (i.e. a child of the platform gameobject) and manipulate their "local" Transform properties (like transform.localPosition, etc). As the platform moves, they move and in turn they move on the platform (via the local manipulations). When you want to get to them in to a platform or other game manager script/behaviour, you can use the GetComponentsInChildren on the platform gameobject or transform.
I must say as well, you sometimes need a hierarchy just to organise things a little. Not ideal this but we are only human!
↧