Game Development Reference
In-Depth Information
Exploring the Views
Now that you are becoming more adept at manipulating the viewport, you can check out several of
the tools and features available to you with each of the main views.
Hierarchy View
The Hierarchy view is essentially a list tree of the objects currently in the loaded or active scene.
The key word here is “currently” because during run-time, objects can be “instantiated” (created
on the fly) or destroyed (deleted from the scene). This is an important concept in Unity, and
it is one of the reasons that most changes made during run-time are not permanent. On exiting
Play mode, the Hierarchy view will be returned to its former state.
During your experimenting with the viewport, you may have accidentally clicked on an object in the
Scene view. When selected that way, the hierarchy in the Hierarchy view will be expanded to show
the picked object. As you may have noticed, some of the objects are children of children of the
top-level objects in the scene. With this in mind, you can imagine how difficult it can be to locate
particular objects in either the Scene or Hierarchy view. As the topic's project comes together, you
will be importing and using several prefabs (Unity's term for reference objects) and will want a quick
means of locating them in the current scene.
Fortunately, Unity has a nice search function for that very purpose. At the top of the Hierarchy view, to
the right of the Create drop-down arrow, you will see a small magnifying glass icon and its drop-down
arrow. The drop-down menu will let you filter for All, Name, or Type. Let's start with Type (Figure 1-23 ).
Figure 1-23. The Search feature's filters
1.
Press the drop-down arrow next to the search icon, and select Type.
2.
In the text file to the right, type camera .
Before you can finish typing, Unity lists the cameras in the scene. In this case, there is only one, Main
Camera. If you select it in the Hierarchy view, it is also selected in the Scene view, along with its view
in the Camera Preview window. Note how everything else in the scene has been grayed out.
3.
Return to a normal Scene view by clicking the x to the right of the word you
typed in.
 
Search WWH ::




Custom Search