Using Layers to Unclutter the World

Unlike a group of objects selected by clicking or dragging, a layer embodies a persistent grouping of objects. As you work in the Design View, you might find it convenient to show or hide layers as one way to display or hide groups of objects quickly.

Layers are not game objects (unlike sublevels), and they do not appear in the Project Lister. However, they are distinct objects that appear in the Layers list, as shown in the figure below.

 

The checkbox next to the name of a layer controls the display of objects in that layer. When a layer’s checkbox is selected, the LevelEditor displays objects in that layer. Clearing the checkbox hides objects in that layer.

 

To show the Layers list, select the Window > Layers menu item.

 

To create a new layer, right click in the Layers window and select Add Layer from the contextual menu. The LevelEditor creates a new layer object in the Layers window with the name “New Layer”; select the layer to enter a new name.

 

To add a sub-layer under the current level, select an existing layer, right-click it, and select Add Layer from the contextual menu.

 

To assign Game Objects to a layer, perform any of the following tasks:

 

To display objects in a layer, select the checkbox next to the layer name to show its objects

 

To hide objects in a layer, clear the checkbox next to the layer name to hide its objects.