Organizing your Scene

Tutorial

·

Beginner

·

+10XP

·

30 mins

·

(513)

Unity Technologies

Organizing your Scene

When creating any Scene in Unity, it’s helpful to keep things tidy in the Hierarchy window so you can easily find GameObjects or game mechanics you are looking for. This section contains some tips that aren’t essential for using the Game Kit, but will help you keep your Projects organized.

Languages available:

1. Hierarchy

In the Game Kit’s Hierarchy window, we have created sections to categorize different types of GameObjects in the Scene.

These sections have headers made of empty GameObjects. They have no function other than to help identify the types of GameObjects in the Scene. Note that the GameObjects underneath each section header are not children of that GameObject, and they shouldn’t be.

Let’s create a new section to store all of the extra level decoration.

  • At the top of the Hierarchy window go to Create > Create Empty

This creates a new, empty GameObject named GameObject at the bottom of the Hierarchy window

In the Hierarchy window, make sure the new GameObject is highlighted blue, indicating you have it selected. You can now rename it:

  • Navigate to the Inspector window.
  • At the top of the Inspector window, select the name field.
  • Enter the name ----- Environment -----.

Sections like this help you find GameObjects when you have a lot of them in the Hierarchy window.

Now let’s add a block to the Scene from the Building Blocks folder.

  • Go to the Project Browser, navigate to the Prefabs folder, and locate the BuildingBlocks folder.
  • Drag any block into the Hierarchy window to add it to the Scene.

Next, place it in the right section so you can find it easier later.

  • In the Hierarchy window, locate the Building Block you just dragged in.
  • Left-click, hold and drag the Building Block until it is under the ----- Environment ----- section header, then release.

Make sure you do not release left-click on top of another GameObject, because this makes it a child GameObject. There is a visual indicator when something will become a child of a GameObject; when you drag one GameObject over another, Unity highlights it in the Hierarchy window, like this:

When you are placing a GameObject alongside another (rather than as a child GameObject of it), a horizontal line appears. Make sure this appears under the ----- Environment ----- section header, like this, before you release left-click:

If you accidentally place it as a child GameObject, you can move it back and try again.

Complete this tutorial