Game Development Reference
In-Depth Information
Skybox
The Skybox might seem a strange place to begin an analysis of 2D, but it
demonstrates an important feature set for cameras, specifically layering. The Skybox
is essentially a cube-based background that's attached to a camera to show clouds,
skies, and other distant details that should always act as the backdrop to a scene,
but it never represents anything that the player can move close to. It is always
distant, as shown here:
Skybox assets display a sky background for cameras
The main problem with the default Skyboxes native to Unity is that they remain
static and motionless by default. Most developers, however, want their skies and
clouds to gently rotate, even when the camera is standing motionless, to portray the
procession of a day or of time passing. Now, let's create an improved Skybox prefab
using the Unity Skybox assets, two layered cameras, and a C# script file.
The inal project for a rotating Skybox can be found in the topic's
companion files.
For the sample project created here, let's import the Character Controllers package
for a first-person controller asset, the Terrain Assets package for terrain textures
that we can paint onto a sample terrain, and the Skyboxes package for the Skybox
textures, as shown in the following screenshot.
 
Search WWH ::




Custom Search