The Lighting window (menu: Window > Rendering > Lighting) is the main control point for Unity’s lighting features. You can use the Lighting window to adjust settings related to the lighting in your Scene, and to optimise your precomputed lighting data for quality, bake time, and storage space.
You can perform many of the functions available in the Lighting window in scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary, using the LightingSettings and Lightmapping APIs.
The Lighting window contains the following elements:
The 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 tab displays information about the Lighting Settings Asset that is assigned to the active Scene. If no Lighting Settings Asset is assigned to the active Scene, it displays information about the default LightingSettings object.
The Scene tab is divided into the following sections:
Use the controls in this section to assign a Lighting Settings Asset to the active Scene, or to create a new Lighting Settings Asset.
Property: | Function: |
---|---|
Lighting Settings | The Lighting Settings Asset assigned to the active Scene. |
New Lighting Settings | Click this button to generate a new Lighting Settings Asset in your Project, and automatically assign the new Lighting Settings Asset to the active Scene. |
Use this section to view and edit the properties of the Lighting Settings Asset or LightingSettings
object assigned to the current Scene. See Lighting Settings Asset.
The Adaptive Probe Volumes tab contains settings related to Adaptive Probe Volumes (APV). This tab only appears if you use URP or HDRP in your project. Refer to the following for more information:
The Environment tab contains settings related to environmental lighting effects for the current Scene. The contents depend on the render pipeline that your Project uses.
The Environment tab is divided into two sections:
The Environment section contains lighting-related settings and controls that apply to the environmental lighting in the current scene, such as the Skybox, diffuse lighting and reflections.
Property: | Function: | |
---|---|---|
Skybox Material | A Skybox is a Material that appears behind everything else in the Scene to simulate the sky or other distant background. Use this property to choose the Skybox you want to use for the Scene. The default value is the built-in Default Skybox. | |
Sun Source | Select a Light to use as the sun in your Scene. Unity uses this Light to simulate the effect of sun position and intensity on the Skybox and your Scene. If you set this to None, Unity considers the brightest directional light in the Scene the sun. Lights whose Render Mode property is set to Not Important do not affect the Skybox. For more information about the Render Mode setting, see the Additional settings section of Lights. |
|
Realtime Shadow Color | Define the color that Unity uses to render real-time shadows in Subtractive Lighting Mode. | |
Environment Lighting | This section contains settings that affect ambient light in the current Scene. | |
Source | Use this to define a source color for ambient light in the Scene. The default value is SkyboxA special type of Material used to represent skies. Usually six-sided. More info See in Glossary. |
|
Skybox | Use the colors of the Skybox set in Skybox Material to determine the ambient light coming from different angles. This allows for more precise effects than Gradient. | |
Gradient | Choose separate colors for ambient light from the sky, horizon and ground, and blend smoothly between them. | |
Color | Use a flat color for all ambient light. | |
Intensity Multiplier | Use this to set the brightness of the ambient light in the Scene, defined as a value between 0 and 8. The default value is 1. | |
Environment Reflections | This section contains global settings for Reflection ProbeA rendering component that captures a spherical view of its surroundings in all directions, rather like a camera. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. More info See in Glossary baking, and settings that affect global reflections. |
|
Source | Use this setting to specify whether you want to use the Skybox for reflection effects, or a Cubemap of your choice. The default value is Skybox. | |
Skybox | Select this to use the Skybox as the reflection source. | |
Custom | Select this to use either a Cubemap asset or a RenderTexture of type cube for reflections. | |
Resolution | Use this to set the resolution of the Skybox for reflection purposes. This property is visible only when Source is set to Skybox. | |
CubemapA collection of six square textures that can represent the reflections in an environment or the skybox drawn behind your geometry. The six squares form the faces of an imaginary cube that surrounds an object; each face represents the view along the directions of the world axes (up, down, left, right, forward and back). More info See in Glossary |
Use this to specify the Cubemap to use for reflection purposes. This property is visible only when Source is set to Cubemap. | |
CompressionA method of storing data that reduces the amount of storage space it requires. See Texture Compression, Animation Compression, Audio Compression, Build Compression. See in Glossary |
Use this to define whether or not reflection textures are compressed. The default setting is Auto. | |
Auto | The reflection texture is compressed if the compression format is suitable. | |
Uncompressed | The reflection texture is stored in memory uncompressed. | |
Compressed | The texture is compressed. | |
Intensity Multiplier | The degree to which the reflection source is visible in reflective objects. | |
Bounces | A reflection bounce occurs when a reflection from one object is then reflected by another object. Use this property to set how many times the Reflection Probes evaluate bounces back and forth between objects. If this is set to 1, then Unity only takes the initial reflection (from the skybox or cube map specified in the Reflection Source property) into account. |
The Other Settings section contains settings for fog, HalosThe glowing light areas around light sources, used to give the impression of small dust particles in the air. More info
See in Glossary, Flares and Cookies.
Property: | Function: | |||
---|---|---|---|---|
FogA post-processing effect that overlays a color onto objects depending on the distance from the camera. Use this to simulate fog or mist in outdoor environments, or to hide clipping of objects near the camera’s far clip plane. More info See in Glossary |
Enables or disables fog in the Scene. Note that fog is not available with the Deferred rendering path. | |||
Color | Use the color picker to set the color Unity uses to draw fog in the Scene. | |||
Mode | Define the way in which the fogging accumulates with distance from the 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. |
|||
Linear | Fog density increases linearly with distance. | |||
Start | Set the distance from the Camera at which the fog starts. | |||
End | Set the distance from the Camera at which the fog completely obscures Scene GameObjectsThe 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. |
|||
Exponential | Fog density increases exponentially with distance. | |||
Density | Use this to control the density of the fog. The fog appears more dense as the Density increases. | |||
Exponential Squared | Fog density increases faster with distance (exponentially and squared). | |||
Density | Use this to control the density of the fog. The fog appears more dense as the Density increases. | |||
Halo Texture | Set the Texture you want to use for drawing a Halo around lights. | |||
Halo Strength | Define the visibility of Halos around Lights, from a value between 0 and 1. | |||
Flare Fade Speed | Define the time (in seconds) over which lens flaresA component that simulates the effect of lights refracting inside a camera lens. Use a Lens Flare to represent very bright lights or add atmosphere to your scene. More info See in Glossary fade from view after initially appearing. This is set to 3 by default. |
|||
Flare Strength | Define the visibility of lens flares from lights, from a value between 0 and 1. | |||
Spot Cookie | Set the Cookie texture you want to use for Spot Lights. The default is ‘Soft’. To revert to ‘Soft’, select None. |
The Realtime LightmapsA pre-rendered texture that contains the effects of light sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the effect of lighting. More info
See in Glossary tab shows a list of all lightmaps generated by the EnlightenA lighting system by Geomerics used in Unity for Enlighten Realtime Global Illumination. More info
See in Glossary Realtime Global IlluminationA group of techniques that model both direct and indirect lighting to provide realistic lighting results.
See in Glossary system in the current Scene. If Enlighten Realtime Global Illumination is not enabled in your Project, this tab will be empty.
This tab displays a list of all the lightmaps generated by the lightmapperA tool in Unity that bakes lightmaps according to the arrangement of lights and geometry in your scene. More info
See in Glossary for the current scene, and the Lighting Data Asset.
If you use Scene view Draw Modes to preview lightmapping, the tab also contains the temporary lightmaps Unity generates for the preview.
If Baked Global Illumination is not enabled in your Project, the tab is empty.
Controls for precomputing lighting data are at the bottom of the Lighting window.
Property: | Function: | |
---|---|---|
GPU Baking Device | Use this to change the GPU that Unity uses for precomputing lighting data. This property is visible only when you use the GPU Progressive Lightmapper backend. | |
GPU Baking Profile | The profile you select in this property defines how the GPU Lightmapper breaks lightmaps into smaller tiles to reduce GPU memory usage. With the Automatic profile selected, Unity chooses the tile size based on the size of the largest lightmap while still aiming for good GPU utilization. Highest Performance and High Performance profiles force a higher fixed tile size for all lightmaps. Low Memory Usage and Lowest Memory Usage profiles force a lower fixed tile size for all lightmaps. Small tiles take up less GPU memory at the expense of lower GPU utilization, leading to longer bake times. This property is visible only when you use the GPU Progressive Lightmapper. | |
Bake on Scene Load | Set whether Unity automatically generates precomputed lighting data. | |
Never | Prevent Unity from automatically generating precomputed lighting data when you open a scene. To generate lighting data manually, select Generate Lighting. This is the default mode in a new Unity 6 project. | |
If Missing Lighting Data | Enable Unity automatically generating precomputed lighting data when you open a scene, if the data doesn’t exist or is invalid. This is the default mode for a project that was created in Unity 2023.2 or earlier. Refer to Upgrade to Unity 6 for more information. | |
Generate Lighting | Select the Generate Lighting button to precompute lighting data. This data includes lightmaps for the Baked Global Illumination system, lightmaps for the Enlighten Realtime Global Illumination system, Light Probes, Adaptive Probe Volumes, and Reflection Probes. Edits you make after starting the bake process using the Generate Lighting button do not affect baked lighting. Open the Generate Lighting dropdown and select Bake Probe Volumes to bake only the Adaptive Probe Volumes in the scene or Baking Set. Open the Generate Lighting dropdown and select Bake Reflection Probes to bake only the Reflection Probes for all open Scenes. Note: If you select Bake Reflection Probes but you haven’t baked the scene before, Unity also bakes lightmaps, Light Probes, and Adaptive Probe Volumes. Open the Generate Lighting dropdown and select Clear Baked Data to clear all precomputed lighting data from all open scenes without clearing the GI CacheThe cached intermediate files used when Unity precomputes lighting data. Unity keeps this cache to speed up computation. More info See in Glossary. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.