Wanzyee Studio

Group or ungroup scene UnityEngine.Transform for better arrangement. More...

Static Public Member Functions

static void MakeGroup ()
 Make a group contains selected children in the scene, hotkey "Ctrl-G". More...
 
static void UngroupParent ()
 Ungroup children from selected parent in the scene, hotkey "Ctrl-Shift-G". More...
 
static void UngroupChildren ()
 Ungroup selected children to upward parent, hotkey "Ctrl-Alt-G". More...
 
static Transform[] FilterTops (params Transform[] transforms)
 Filter the top level transforms, excluding prefabs, ordered by sibling index. More...
 
static Transform MakeGroup (string name, params Transform[] children)
 Make a group contains specified children. More...
 
static Transform[] UngroupParent (Transform parent, bool destroy=false)
 Ungroup all children from the specified parent. More...
 
static Transform UngroupChild (Transform child)
 Ungroup a child from the current parent to upward. More...
 

Detailed Description

Group or ungroup scene UnityEngine.Transform for better arrangement.

Menu "GameObject/Group/Make Group" or hotkey "Ctrl-G", to group selected children. Menu "GameObject/Group/Ungroup Parent" or hotkey "Ctrl-Shift-G", to ungroup selected parents. Menu "GameObject/Group/Ungroup Children" or hotkey "Ctrl-Alt-G", to move selected children out from the group.

Member Function Documentation

static void MakeGroup ( )
static

Make a group contains selected children in the scene, hotkey "Ctrl-G".

static void UngroupParent ( )
static

Ungroup children from selected parent in the scene, hotkey "Ctrl-Shift-G".

This'll destroy the parent if it has no other UnityEngine.Component. Works like Transform.DetachChildren but detach to upward parent instead of root.

static void UngroupChildren ( )
static

Ungroup selected children to upward parent, hotkey "Ctrl-Alt-G".

static Transform [] FilterTops ( params Transform[]  transforms)
static

Filter the top level transforms, excluding prefabs, ordered by sibling index.

Parameters
transformsTransforms.
Returns
The tops.
static Transform MakeGroup ( string  name,
params Transform[]  children 
)
static

Make a group contains specified children.

Parameters
nameName.
childrenChildren.
Returns
The group parent.
static Transform [] UngroupParent ( Transform  parent,
bool  destroy = false 
)
static

Ungroup all children from the specified parent.

Optional to destroy the original parent after done. Works like UnityEngine.Transform.DetachChildren but detach to upward parent instead of root.

Parameters
parentParent.
destroyIf set to true destroy.
Returns
The children from the parent.
static Transform UngroupChild ( Transform  child)
static

Ungroup a child from the current parent to upward.

Parameters
childChild.
Returns
The new parent.