Version: Unity 6.1 Alpha (6000.1)
Language : English
Sky
Configure a skybox with a Skybox Shader

Create a skybox

To create a new skyboxA special type of Material used to represent skies. Usually six-sided. More info
See in Glossary
Material:

  1. From the menu bar, click Assets > Create > Material.
  2. In the ShaderA program that runs on the GPU. More info
    See in Glossary
    drop-down, click Skybox then the skybox Shader you want to use.
  3. You can now fill out the properties on the Material to set up the skybox. The properties available on the Material depend on the skybox Shader the Material uses.

Note: Each skybox Shader has its own set of prerequisite Textures that differ in number and Texture formatA file format for handling textures during real-time rendering by 3D graphics hardware, such as a graphics card or mobile device. More info
See in Glossary
. For information on the Textures a particular skybox Shader requires, see the documentation for that skybox Shader. You can find the list of skybox Shaders and their documentation on the skybox Shaders page.

Drawing a skybox in your Scene

After you create a skybox Material, you can render it in your SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
. To do this:

  1. From the menu bar, click Window > Rendering > Lighting Settings.
  2. In the window that appears, click the Environment tab.
  3. Assign the skybox Material to the Skybox Material property.

This draws the skybox in the background of every CameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
in your Scene. If you instead only want to draw the skybox for a particular Camera, see Drawing a skybox for a particular Camera.

Drawing a skybox for a particular Camera

If you only want to draw a skybox in the background of a particular Camera, use the Skybox component. When you attach this component to a GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
with a Camera, it overrides the skybox that the Camera draws. To attach and set up the Skybox component:

  1. Select a Camera in your Scene and view it in the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
    See in Glossary
    window.
  2. Click Add Component > Rendering > Skybox.
  3. On the Skybox component, assign the skybox Material to the Custom Skybox property.

Best Practices

If your Skybox includes a sun, moon, or other light in it, set up a Directional Light that points in the same direction as the light. This makes it appear as though the light in your skybox creates shadows in your Scene. If there are multiple Directional Lights in your Scene, you can choose which Directional Light the Skybox uses. To do this:

  1. From the menu bar, click Window > Rendering > Lighting Settings.
  2. Click the Scene tab.
  3. Assign the Directional Light you want to use to the Sun Source property.

If you want to have fog in your Scene, match the fog color to the color of the skybox. This makes the fog blend to the color of the Scene sky. To do this:

  1. From the menu bar, click Window > Rendering > Lighting Settings.
  2. Click the Environment tab.
  3. In the Other Settings section, enable the Fog checkbox.
  4. Set the Color property to a color that suits your skybox. For this, you can use the ink dropper tool to select a color from the Scene.
Sky
Configure a skybox with a Skybox Shader