◆ AllDecendantsList() [2/2]

static void AllDecendantsList ( this Transform  transform,
ref List< Transform >  list,
bool  groupByLevel = true 
)
static
Parameters
transformcalling transform. all's it descendants will be included in the result. It will not be included itself.
listList to which to add the transform references. If null, a new list will be created.
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.