Our level has a few objects that could use some organization, and Unity makes this easy by letting us create empty GameObjects. An empty object is a perfect container for holding related groups of objects because it doesn't come with any components attached—it's a shell.Â
Let's take our ground plane and four walls and group them all under a common empty GameObject:
- Select Create | Create Empty in the Hierarchy panel and name the new object Environment.
- Drag and drop the ground plane and the four walls into Environment, making them child objects.
- Select the Environment empty object and check that its X, Y, and ZÂ positions are all set to 0:
The environment exists in the Hierarchy tab as a parent object, with the arena objects as its children. Now we're able to expand or close the Environment object drop-down list with the arrow icon, making the Hierarchy panel less cluttered.
It...