Setting up an environment with Procedural Skybox and Directional Light
Besides the traditional six-sidedandCubemap Skyboxes, Unity also features a third type of skybox: the Procedural Skybox. Easy to create and set up, the Procedural Skybox can be used in conjunction with a Directional Light to provide Environment Lighting in your scene. In this recipe, we will learn about the different parameters of the Procedural Skybox:

How to do it...
To set up Environment Lighting
using the Procedural Skybox
and Directional Light, follow these steps:
- Create a new Scene inside a Unity project. Observe that a new scene already includes two objects: the
Main Camera
and aDirectional Light
. - In the scene, create a
3D Plane
namedPlane-ground
; positioned at (0, 0, 0) and scaled to (20, 20, 20
). - Add some
3D Cubes
to your scene, like so:

- Create a new Material asset file named
m_skybox
. In the Inspector, change theShader
fromStandard
to Skybox/Procedural. - Open the Lighting window (
Window | Rendering | Lighting Settings...