Peek
>
Manual
>
Tools
>

Groups

Updated: 2019-08-15

Groups allow you to immediately move multiple children under a new empty game object. This tidies up your scene without having to manually objects around your hierarchy.


Grouping

First, select the game objects you would like to group in the scene or hierarchy.

Then, use any of the following methods to group:

  • Edit > Group Selection
  • Right Click > Group
  • Ctrl+G (Cmd+G on Mac)

A prompt will appear to type the group's name. When you're done, click OK or press Enter. To abort the operation, click Cancel or press Escape.

The new created group game object has the following properties:

  • It is completely empty: its only component is a Transform (or RectTransform)
  • It is a child of the shallowest element of the selection
  • Its position is centered within the bounds of the selection
  • Its rotation and scale are by default

Ungrouping

First, select the group(s) you would like to ungroup.

Then, use any of the following methods to ungroup:

  • Edit > Ungroup Selection
  • Right Click > Ungroup
  • Ctrl+Shift+G (Cmd+Shift+G on Mac)

You can ungroup multiple groups at once!

Ungrouping will only work on empty objects. Parent objects with components will never get destroyed, so no need to worry about accidentally losing work.


Global Groups

Unlike normal (local) groups, global groups get created at the root of the scene and are positioned at the scene's origin (0, 0, 0). You can create a global group via:

  • Edit > Group Selection Globally
  • Right Click > Group Globally
  • Ctrl+Alt+G (Cmd+Alt+G on Mac)

Grouping and ungrouping does not work on children of prefab instances, because the new prefab workflow prohibits restructuring the hierarchy for them. To create groups within prefabs, you first have to open the prefab in isolation mode.


Transform Operations

Peek also adds 3 new operations available from the Transform context menu. These operations let you conveniently move parent transforms without affecting their children.

Bake

Bake works exactly like Reset:

  • Position is set to (0, 0, 0)
  • Rotation is set to (0, 0, 0)
  • Scale is set to (1, 1, 1)

However, unlike Reset, Bake preserves the global position, rotation and scale of all the children. This is useful if you have a dummy parent that you only use as a hierarchical group, but you mistakenly moved it around during scene operations.

Center on Pivots

Center on Pivots sets the parent transform's position to the average of the positions of all the children. This operation also preserves the transform of the children. It is useful if you use the parent as a spatial group, but mistakenly moved it away from its contents during scene operations.

Center on Bounds

Center on Bounds also centers the parent to its children, except it calculates the bounds of each children instead of their average pivot positions. In most cases, both center operations should yield similar results. Centering on bounds is a little bit more precise.

Was this article helpful?
Be the first to vote!
Yes, helpful
No, not for me