# LightingSettings

> An object containing settings for precomputing lighting data, that Unity can serialize as a Lighting Settings Asset.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule
* **Inherits from:** [Object](/engine/6000.7/script-reference/unityengine/object.md)

```csharp
public sealed class LightingSettings : Object
```

## Remarks

When the Unity Editor precomputes lighting data for a Scene that uses the Baked Global Illumination system or the Enlighten Realtime Global Illumination system, it uses settings from a `LightingSettings` object. The same `LightingSettings` object can be assigned to more than one Scene, which makes it possible to share settings across multiple Scenes.

The following example shows how to create a `LightingSettings` object and assign it to the active Scene using the [Lightmapping.lightingSettings](/engine/6000.7/script-reference/unityeditor/lightmapping/lightingsettings.md) API:

```csharp
using UnityEngine;
using UnityEditor;

public class CreateLightingSettingsExample
{
    [MenuItem("Example/Create Lighting Settings")]
    static void CreateExampleLightingSettings()
    {
        // Create an instance of LightingSettings
        LightingSettings lightingSettings = new LightingSettings();

        // Configure the LightingSettings object
        lightingSettings.albedoBoost = 8.0f;

        // Assign the LightingSettings object to the active Scene
        Lightmapping.lightingSettings = lightingSettings;
    }
}
```

The following example shows how to create a `LightingSettings` object, and save it to disk as a Lighting Settings Asset using the [AssetDatabase.CreateAsset](/engine/6000.7/script-reference/unityeditor/assetdatabase/createasset.md) API.

```csharp
using UnityEngine;
using UnityEditor;

public class CreateLightingSettingsExample
{
    [MenuItem("Example/Create Lighting Settings")]
    static void SaveExampleLightingSettingsToDisk()
    {
        // Create an instance of LightingSettings
        LightingSettings lightingSettings = new LightingSettings();

        // Configure the LightingSettings object
        lightingSettings.albedoBoost = 8.0f;

        // Save it to your Project, using the .lighting extension
        AssetDatabase.CreateAsset(lightingSettings, "Assets/ExampleLightingSettings.lighting");
    }
}
```

Additional Resources: [Lighting Settings Asset](/engine/6000.7/manual/lighting-overview/lighting-reference/class-lighting-settings.md).

## Properties

| Property                                                                                                                                     | Description                                                                                                                                                                                                                                                                            |
| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [albedoBoost](/engine/6000.7/script-reference/unityengine/lightingsettings/albedoboost.md)                                                   | The intensity of surface albedo throughout the Scene when considered in lighting calculations. This value influences the energy of light at each bounce. (Editor only).                                                                                                                |
| [ao](/engine/6000.7/script-reference/unityengine/lightingsettings/ao.md)                                                                     | Whether to apply ambient occlusion to lightmaps. (Editor only).                                                                                                                                                                                                                        |
| [aoExponentDirect](/engine/6000.7/script-reference/unityengine/lightingsettings/aoexponentdirect.md)                                         | Determines the degree to which direct lighting is considered when calculating ambient occlusion in lightmaps. (Editor only).                                                                                                                                                           |
| [aoExponentIndirect](/engine/6000.7/script-reference/unityengine/lightingsettings/aoexponentindirect.md)                                     | Sets the contrast of ambient occlusion that Unity applies to indirect lighting in lightmaps. (Editor only).                                                                                                                                                                            |
| [aoMaxDistance](/engine/6000.7/script-reference/unityengine/lightingsettings/aomaxdistance.md)                                               | The distance that a ray travels before Unity considers it to be unoccluded when calculating ambient occlusion in lightmaps. (Editor only).                                                                                                                                             |
| [bakedGI](/engine/6000.7/script-reference/unityengine/lightingsettings/bakedgi.md)                                                           | Whether to enable the Baked Global Illumination system for this Scene.                                                                                                                                                                                                                 |
| [blockAlignedPacking](/engine/6000.7/script-reference/unityengine/lightingsettings/blockalignedpacking.md)                                   | Aligns UV charts in the lightmap to 4x4 texel boundaries.                                                                                                                                                                                                                              |
| [bruteForcePacking](/engine/6000.7/script-reference/unityengine/lightingsettings/bruteforcepacking.md)                                       | Whether to exhaustively check every possible lightmap layout when packing lightmaps.                                                                                                                                                                                                   |
| [denoiserTypeAO](/engine/6000.7/script-reference/unityengine/lightingsettings/denoisertypeao.md)                                             | Determines the type of denoising that the Progressive Lightmapper applies to ambient occlusion in lightmaps. (Editor only).                                                                                                                                                            |
| [denoiserTypeDirect](/engine/6000.7/script-reference/unityengine/lightingsettings/denoisertypedirect.md)                                     | Determines the denoiser that the Progressive Lightmapper applies to direct lighting. (Editor only).                                                                                                                                                                                    |
| [denoiserTypeIndirect](/engine/6000.7/script-reference/unityengine/lightingsettings/denoisertypeindirect.md)                                 | Determines the denoiser that the Progressive Lightmapper applies to indirect lighting. (Editor only).                                                                                                                                                                                  |
| [directionalityMode](/engine/6000.7/script-reference/unityengine/lightingsettings/directionalitymode.md)                                     | Determines whether the lightmapper should generate directional or non-directional lightmaps. (Editor only).                                                                                                                                                                            |
| [directSampleCount](/engine/6000.7/script-reference/unityengine/lightingsettings/directsamplecount.md)                                       | Specifies the number of samples the Progressive Lightmapper uses for direct lighting calculations. (Editor only).                                                                                                                                                                      |
| [environmentImportanceSampling](/engine/6000.7/script-reference/unityengine/lightingsettings/environmentimportancesampling.md)               | Determines whether Progressive Lightmappers use importance sampling when they sample environment lighting while baking.                                                                                                                                                                |
| [environmentSampleCount](/engine/6000.7/script-reference/unityengine/lightingsettings/environmentsamplecount.md)                             | Specifies the number of samples the Progressive Lightmapper uses when sampling indirect lighting from the skybox. (Editor only).                                                                                                                                                       |
| [extractAO](/engine/6000.7/script-reference/unityengine/lightingsettings/extractao.md)                                                       | Whether the Progressive Lightmapper extracts Ambient Occlusion to a separate lightmap. (Editor only).                                                                                                                                                                                  |
| [filteringAtrousPositionSigmaAO](/engine/6000.7/script-reference/unityengine/lightingsettings/filteringatrouspositionsigmaao.md)             | Specifies the threshold the Progressive Lightmapper uses to filter direct light stored in the lightmap when using the A-Trous filter. (Editor only).                                                                                                                                   |
| [filteringAtrousPositionSigmaDirect](/engine/6000.7/script-reference/unityengine/lightingsettings/filteringatrouspositionsigmadirect.md)     | Specifies the threshold the Progressive Lightmapper uses to filter the indirect lighting component of the lightmap when using the A-Trous filter. (Editor only).                                                                                                                       |
| [filteringAtrousPositionSigmaIndirect](/engine/6000.7/script-reference/unityengine/lightingsettings/filteringatrouspositionsigmaindirect.md) | Specifies the radius the Progressive Lightmapper uses to filter the ambient occlusion component in the lightmap when you use the Gaussian filter. (Editor only).                                                                                                                       |
| [filteringGaussianRadiusAO](/engine/6000.7/script-reference/unityengine/lightingsettings/filteringgaussianradiusao.md)                       | Specifies the radius the Progressive Lightmapper uses to filter the direct lighting component of the lightmap when you use the Gaussian filter. (Editor only).                                                                                                                         |
| [filteringGaussianRadiusDirect](/engine/6000.7/script-reference/unityengine/lightingsettings/filteringgaussianradiusdirect.md)               | Specifies the radius the Progressive Lightmapper uses to filter the indirect lighting component of the lightmap when you use the Gaussian filter. (Editor only).                                                                                                                       |
| [filteringGaussianRadiusIndirect](/engine/6000.7/script-reference/unityengine/lightingsettings/filteringgaussianradiusindirect.md)           | Specifies the method that the Progressive Lightmapper uses to reduce noise in lightmaps. (Editor only).                                                                                                                                                                                |
| [filteringMode](/engine/6000.7/script-reference/unityengine/lightingsettings/filteringmode.md)                                               | Specifies the filter type that the Progressive Lightmapper uses for ambient occlusion. (Editor only).                                                                                                                                                                                  |
| [filterTypeAO](/engine/6000.7/script-reference/unityengine/lightingsettings/filtertypeao.md)                                                 | Specifies the filter kernel that the Progressive Lightmapper uses for ambient occlusion. (Editor only).                                                                                                                                                                                |
| [filterTypeDirect](/engine/6000.7/script-reference/unityengine/lightingsettings/filtertypedirect.md)                                         | Specifies the filter kernel that the Progressive Lightmapper uses for the direct lighting. (Editor only).                                                                                                                                                                              |
| [filterTypeIndirect](/engine/6000.7/script-reference/unityengine/lightingsettings/filtertypeindirect.md)                                     | Specifies whether the Editor calculates the final global illumination light bounce at the same resolution as the baked lightmap.                                                                                                                                                       |
| [indirectResolution](/engine/6000.7/script-reference/unityengine/lightingsettings/indirectresolution.md)                                     | Defines the number of texels that Enlighten Realtime Global Illumination uses per world unit when calculating indirect lighting. (Editor only).                                                                                                                                        |
| [indirectSampleCount](/engine/6000.7/script-reference/unityengine/lightingsettings/indirectsamplecount.md)                                   | Specifies the number of samples the Progressive Lightmapper uses for indirect lighting calculations. (Editor only).                                                                                                                                                                    |
| [indirectScale](/engine/6000.7/script-reference/unityengine/lightingsettings/indirectscale.md)                                               | Multiplies the intensity of of indirect lighting in lightmaps. (Editor only).                                                                                                                                                                                                          |
| [lightmapCompression](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmapcompression.md)                                   | The level of compression the Editor uses for lightmaps.                                                                                                                                                                                                                                |
| [lightmapMaxSize](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmapmaxsize.md)                                           | The maximum size in pixels of an individual lightmap texture. (Editor only).                                                                                                                                                                                                           |
| [lightmapPackingMethod](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmappackingmethod-1.md)                             | The algorithm used to pack UV charts into lightmaps.                                                                                                                                                                                                                                   |
| [lightmapPackingMode](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmappackingmode-1.md)                                 | The approach used to pack UV charts into lightmaps.                                                                                                                                                                                                                                    |
| [lightmapPadding](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmappadding.md)                                           | Sets the distance (in texels) between separate UV tiles in lightmaps. (Editor only).                                                                                                                                                                                                   |
| [lightmapper](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmapper-1.md)                                                 | Determines which backend to use for baking lightmaps in the Baked Global Illumination system. (Editor only).                                                                                                                                                                           |
| [lightmapResolution](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmapresolution.md)                                     | Defines the number of texels to use per world unit when generating lightmaps.                                                                                                                                                                                                          |
| [lightProbeSampleCountMultiplier](/engine/6000.7/script-reference/unityengine/lightingsettings/lightprobesamplecountmultiplier.md)           | Specifies the number of samples to use for Light Probes relative to the number of samples for lightmap texels. (Editor only).                                                                                                                                                          |
| [maxBounces](/engine/6000.7/script-reference/unityengine/lightingsettings/maxbounces.md)                                                     | Stores the maximum number of bounces the Progressive Lightmapper computes for indirect lighting. (Editor only)                                                                                                                                                                         |
| [minBounces](/engine/6000.7/script-reference/unityengine/lightingsettings/minbounces.md)                                                     | Stores the minimum number of bounces the Progressive Lightmapper computes for indirect lighting. (Editor only)                                                                                                                                                                         |
| [mixedBakeMode](/engine/6000.7/script-reference/unityengine/lightingsettings/mixedbakemode.md)                                               | Sets the [MixedLightingMode](/engine/6000.7/script-reference/unityengine/mixedlightingmode.md) that Unity uses for all Mixed Lights in the Scene. (Editor only).                                                                                                                       |
| [packingAttempts](/engine/6000.7/script-reference/unityengine/lightingsettings/packingattempts.md)                                           | The number of packing attempts before determining the most efficient layout.                                                                                                                                                                                                           |
| [prioritizeView](/engine/6000.7/script-reference/unityengine/lightingsettings/prioritizeview.md)                                             | Whether the Progressive Lightmapper prioritizes baking visible texels within the frustum of the Scene view. (Editor only).                                                                                                                                                             |
| [repackUnderutilizedLightmaps](/engine/6000.7/script-reference/unityengine/lightingsettings/repackunderutilizedlightmaps.md)                 | When enabled, Unity attempts to repack lightmaps that are mostly empty at a lower resolution.                                                                                                                                                                                          |
| [respectSceneVisibilityWhenBakingGI](/engine/6000.7/script-reference/unityengine/lightingsettings/respectscenevisibilitywhenbakinggi.md)     | When Unity is precomputing or baking Global Illumination, respect the Scene Visibility setting of a \[\[GameObject] with a [MeshRenderer](/engine/6000.7/script-reference/unityengine/meshrenderer.md) or [Terrain](/engine/6000.7/script-reference/unityengine/terrain.md) component. |

## Enums

| Enum                                                                                                                            | Description                                                    |
| ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| [LightingSettings.DenoiserType](/engine/6000.7/script-reference/unityengine/lightingsettings/denoisertype.md)                   | The available denoisers for the Progressive Lightmapper.       |
| [LightingSettings.FilterMode](/engine/6000.7/script-reference/unityengine/lightingsettings/filtermode.md)                       | The available filtering modes for the Progressive Lightmapper. |
| [LightingSettings.FilterType](/engine/6000.7/script-reference/unityengine/lightingsettings/filtertype.md)                       | The available filter kernels for the Progressive Lightmapper.  |
| [LightingSettings.LightmapPackingMethod](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmappackingmethod.md) | The available lightmap packing algorithms.                     |
| [LightingSettings.LightmapPackingMode](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmappackingmode.md)     | The available approaches for packing lightmaps.                |
| [LightingSettings.Lightmapper](/engine/6000.7/script-reference/unityengine/lightingsettings/lightmapper.md)                     | Backends available for baking lighting.                        |

## Inheritance

**Inherited Members:**

* [Object.GetEntityId()](/engine/6000.7/script-reference/unityengine/object/getentityid.md)
* [Object.GetHashCode()](/engine/6000.7/script-reference/unityengine/object/gethashcode.md)
* [Object.InstantiateAsync\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.Instantiate(Object, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion\))
* [Object.Instantiate(Object, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion-transform\))
* [Object.Instantiate(Object)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object\))
* [Object.Instantiate(Object, Scene)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-scene\))
* [Object.Instantiate\<T>(T, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate(Object, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform\))
* [Object.Instantiate(Object, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform-bool\))
* [Object.Instantiate\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Destroy(Object, float)](/engine/6000.7/script-reference/unityengine/object/destroy.md)
* [Object.DestroyImmediate(Object, bool)](/engine/6000.7/script-reference/unityengine/object/destroyimmediate.md)
* [Object.FindObjectsByType(Type)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type\))
* [Object.FindObjectsByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type-findobjectsinactive\))
* [Object.DontDestroyOnLoad(Object)](/engine/6000.7/script-reference/unityengine/object/dontdestroyonload.md)
* [Object.FindAnyObjectByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(\))
* [Object.FindAnyObjectByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(findobjectsinactive\))
* [Object.FindObjectsByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(\))
* [Object.FindObjectsByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(findobjectsinactive\))
* [Object.FindAnyObjectByType(Type)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type\))
* [Object.FindAnyObjectByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type-findobjectsinactive\))
* [Object.ToString()](/engine/6000.7/script-reference/unityengine/object/tostring.md)
* [Object.name](/engine/6000.7/script-reference/unityengine/object/name.md)
* [Object.hideFlags](/engine/6000.7/script-reference/unityengine/object/hideflags.md)

### Operators

| Operator                                                                           | Description                                                             |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [operator ==](/engine/6000.7/script-reference/unityengine/object/op-equality.md)   | Compares two object references to see if they refer to the same object. |
| [bool](/engine/6000.7/script-reference/unityengine/object/op-implicit.md)          | Determines whether the object exists.                                   |
| [operator !=](/engine/6000.7/script-reference/unityengine/object/op-inequality.md) | Compares if two objects refer to a different object.                    |
