Building the game environment

Before we begin construction, we will set up the snap values. GameObjects can be constrained to move, scale, or rotate according to the snap setting. This is a very useful technique for setting the relative positions of objects.

When positioning objects we'll use one of three techniques:

Using the Snap settings is a time-saver for constructing the gameplay environment. It speeds up the building process by making it easier to align objects in 3D space. Follow these steps to setup snapping and start the construction process: 

  1. Choose Edit | Snap Settings... from the application menu. The Snap feature will let us snap the transform settings to predetermined increments:
Figure 7.8: Set the Snap settings before constructing GameObjects
  1. Create an empty GameObject at the root level of the Hierarchy panel. Rename the GameObject to Environment and position it at (0,0,0). We will use it to house the environmental assets.
  2. Move the Ground asset we created earlier into the Environment GameObject and set its material to BackgroundGrey.
  3. Save the scene.