Sort GameObjects - type?

I’m trying to sort a hierarchy of game objects. The meshes and lights and specific elements are easy enough. But how would I distinguish a container object used to hold the other objects? I am trying to create something like a treeview in winforms. Thanks.

Do you mean like;

Scene → GameObject → MeshFilter → Mesh ?

Sadly, there’s no automatic way. At least, none that I found out. All the dependencies method from Unity returns ALL the dependencies, without regard to the depth.

Yea. I can filter them by name I guess, by giving all of my container gameobjects a prefix. I’m trying to control visibility of objects in a complex scene while i’m working on it. Thanks.