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:
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.
Tip
The final project for a rotating Skybox can be found in the book's companion files.
For the sample...