Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Sandbox uses layers for two main reasons: Organizing your level content and Streaming performance.

Any object you place on a layer (doesn't include vegetation or terrain) can be hidden/unhidden via the Layer Control and also via Flowgraph, which allows loading/unloading of level areas to keep performance high and memory consumption low.

Table of Contents
maxLevel3
minLevel2
excludeOverview

Layer Control

Objects like brushes and entities can be placed on layers which are basically a mechanism to group objects logically.

...

You can find the Layer Tab on the RollupBar. On the Layers tab are a few useful buttons and the layer list. By default, the levels objects will be located on the "main" layer.

Infotip

In the screenshot that several layers have an asterisk after them. This shows layers that have had changes made to them.

Creating a New Layer

To create a new layer, click the New Layer button. After clicking on it, a dialog box will be displayed:

...

To change layer settings, right click on a layer and select Settings in the popup menu. The same dialog box as for creating a new layer will be displayed. Change the settings and click OK.

Setting

Description

Visible

Does the same thing as the layer hide/show icon. See below for more information.

Frozen

Does the same thing as the layer freeze/unfreeze icon. See below for more information.

Export Layer Pak

 

Default Loaded

This layer will be loaded by default.

External

When this checkbox is enabled, the layer will be stored as a separate .lyr file on disk, enabling better use of version control systems.
The layer will automatically be exported when your level is saved, and imported on loading.
Un-checking this box will make the layer part of the .cry file again and the external .lyr file will no longer be updated. External layers are indicated by an underlined layer name.

Export to Game

When this checkbox is enabled, the layer will be exported to the game when you use File -> Export to engine. Un-check this if you don't wish to see the objects contained in the layer in pure game mode.

Brushes Have Physics

Brushes within a layer with this disabled will not have physics. This is good for distance background objects to save on performance.

Assigning Objects to Layers

When you have more than one layer in your level, you can assign your objects to a specific layer.

Select an object and look at its Entity settings on the RollupBar. Click the Layer button to open up the layer list which will allow you to select a different layer.

The image below shows a Particle entity selected, and the Layer's Layers button selected on the RollupBar.

...

After assigning layers to your objects, there are a few additional ways to manage them. Go to the layer list in the RollupBar.

  • Toggling the eye icon will hide/show the objects on that layer.
  • Toggling the arrow icon will allow interaction with objects when the icon is visible (objects are unfrozen), and disallow interaction when the icon is hidden (objects are frozen).

Double clicking on an icon will make all layers change their state of hide/show or frozen/unfrozen, depending on which icon was selected.

...

To un-group the layers, hold CTRL and drag the layer you wish to un-group into the empty space below (or the very bottom of the layer list). It will then be released back into its own main layer.

Image ModifiedImage Modified

Grouped Layers

Un-grouped layers

UserSpecificData

When saving a level, a new folder and file are stored inside the level folder. This will be something like Game\Levels\<Level>\<Level>_editor\userSpecificData.xml.

This file is used to store layer settings (frozen/hidden) for the level and having this file external to the .cry file allows for more flexible settings between multiple users who may be working on a level.

 

...

Excerpt
hiddentrue
Learn how to create, manage, and use layers to manage complex levels.