Game Development Reference
In-Depth Information
Pan around the Scene view to check out your new skybox background, and notice that it also
appeared in the Camera Preview. Any part of the screen not occupied with game elements will now
be filled in with the skybox.
You can have more than one camera in a scene. In the Inspector panel, the Depth only drop-down
setting for Clear Flags is used in this scenario, where the different cameras could be used for a
heads-up display (HUD)or mini-map. Each of these different cameras' views are layered on top of
each other as seen by the player. Clear Flags for additional cameras are set to Depth only, while the
Main Camera's Clear Flags setting usually remains as Skybox and has the lowest depth setting to
make it the scene's final background.
The Don't Clear drop-down setting means the previous frame is not cleared before the next one is
drawn, resulting in a smear-looking effect. This isn't often used.
Background
With Solid Color selected as your Clear Flags property, you can then use the Background property to
select a color that indicates screen areas remaining after the game elements have been drawn.
Culling Mask
Culling Mask designates which layers from your scene will be rendered by the camera. Layers are
used to group objects. You may only want a certain layer of objects to be rendered by one camera
while other layers are rendered by another. As an example, Unity recommends as a good practice to
keep your User Interface (UI) in a separate layer (Figure 3-12 ).
Score: 4
Game Objects
Layer
User Interface
Layer
Hello World!
Figure 3-12. Keeping the Game Objects layer and User Interface layer separate
Projection
The Projection property toggles between Perspective and Orthographic views of the camera.
The camera will render everything inside a special shape called a frustum (see Figure 3-13 ).
 
Search WWH ::




Custom Search