◆ AllDecendants()

static IEnumerable<Transform> AllDecendants ( this Transform  transform,
bool  groupByLevel = true 
)
static
Parameters
transformcalling transform that will be enumerated.
groupByLevelIf true, then items will be added to the list in level or generational order. (children, grand-children, great-grand-children,etc.) Otherwise, it will iterate each branch completely, before moving to the next.
Returns
IEnumberable that can loop though all descendants of the calling transform.