Game Development Reference
In-Depth Information
of longitudinal and latitudinal segments it has. A box or cube is defined by height, width, length, and
its number of segments. When an object cannot be described by a set of parameters, it is called
a “mesh.” A mesh is a collection of vertices, edges, and faces that are used to build the object in
3D space. A primitive is a mesh, but a mesh (no parametric way to define or describe it) is not a
primitive. In Unity, you have less control over the parameters, but the included 3D gameObjects
are primitives, nonetheless. These primitives can be used as is or as the base for more complex
gameObjects.
Let's start by using the project created in the last section of Chapter 1, the UnityTest project.
1.
If Unity is not already open to the UnityTest project, click the Unity icon on
your desktop.
2.
In the Project Wizard, select the UnityTest project.
While the scene is small and you are not adding game play, it will be useful to use the default layout.
3.
Click the Layout button at the top right of the editor to open the list of presets.
4.
Select Default.
The layout reverts to having the Hierarchy view on the left, the Inspector on the right, the Scene and
Game views tabbed in the center, and the Project view underneath.
The project has a default, nameless scene, but it has not yet been saved.
5.
From the File menu, select “Save Scene as.”
6.
Save the scene as Primitives .
The new scene asset appears in the Project view, sporting the Unity application icon (Figure 2-1 ).
Figure 2-1. The new Unity scene asset in the Project view
7.
From the GameObject menu, Create Other, select Cube (Figure 2-2 ).
Search WWH ::




Custom Search