Objects and hierarchy

As shown in the preceding screenshot, the default empty Unity scene consists of a main camera and a single directional light. These are listed in the Hierarchy panel, and depicted in the Scene view panel. Your Scene panel also shows a perspective view of an infinite reference ground plane grid, like a piece of graph paper with nothing on it. The grid spans across the x (red) and z (blue) axes. The y axis (green) is up.

An easy way to remember the Gizmo axis colors is: R-G-B correspond to x-y-z

The Inspector panel shows the details of the currently selected item. Try the following in your Unity editor:

  1. Select the Directional Light with your mouse, either from the Hierarchy list or within the scene itself.
  2. Look at the Inspector panel for each of the properties and components associated with the object, including its transform.

An object's transform specifies its position, rotation, and scale in the 3D world space. For example, a position (0, 3, 0) is 3 units above (y direction) the center of the ground plane (X=0, Z=0). A rotation of (50, 330, 0) means that it's rotated 50 degrees around the x axis and 330 degrees around the y axis. As you'll see, you can change an object's transforms numerically here, or directly with the mouse in the Scene panel.

Similarly, if you click the Main Camera, it may be located at position (0, 1, -10) with no rotation. That is, it's pointed straight ahead, towards the positive z direction.

When you select the Main Camera, as shown in the preceding editor screen capture, a Camera Preview inset is added to the Scene panel, which shows the view that the camera presently sees (if the Game tab is open, you'll see the same view there too). Presently the view is empty and the reference grid is not rendered, but a foggy horizon is discernible, with the grey ground plane below and the blue default ambient skybox above.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset