A Lighting Settings Asset represents a saved instance of the LightingSettings class, which stores data for the Baked Global IlluminationA group of techniques that model both direct and indirect lighting to provide realistic lighting results.
See in Glossary and the EnlightenA lighting system by Geomerics used in Unity for Enlighten Realtime Global Illumination. More info
See in Glossary Realtime Global Illumination systems. The Unity Editor uses this data when it precomputes lighting data for a 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 that uses one or both of these systems.
You can assign the same Lighting Settings Asset or instance of the LightingSettings
class to more than one Scene, which makes it easy to share Global Illumination system settings across multiple Scenes.
There are two ways to create a Lighting Settings Asset in the Unity Editor.
To create a Lighting Settings Asset from the Project view:
To create and automatically assign Lighting Settings Asset from the Lighting window:
Select Clone instead to create a duplicate of the current Lighting Settings Asset, and immediately assign it to the active Scene.
You can also create a Lighting Settings Asset from a script. To do this, create an instance of the LightingSettings class and either save it to disk, or assign it to a Scene and save that Scene. For more information and code examples, see the LightingSettings API documentation.
To assign a Lighting Settings Asset to a Scene in the Unity Editor:
You can also assign a Lighting Settings Asset to the active Scene from a script. To do this, load the Lighting Settings Asset to obtain an instance of the LightingSettings
class, then use the Lightmapping.lightingSettings
API to assign that LightingSettings
instance to the active Scene. For more information and code examples, see the LightingSettings API documentation.
You can view and edit the properties of Lighting Settings Asset in two places in the Unity Editor:
You can also read from or write to the properties of a Lighting Settings Asset from a script. To do this, load the Lighting Settings Asset to obtain an instance of theLightingSettings
class, and access its properties. For more information and code examples, see the LightingSettings API documentation.
When a Scene does not have a Lighting Settings Asset assigned to it, Unity uses the default LightingSettings
object for that Scene. The default LightingSettings
object is an internal, read-only instance of the LightingSettings
class.
You cannot make any changes to the LightingSettings
data for a Scene that uses the default LightingSettings
, but Unity can perform a bake using its settings.
To make changes to the LightingSettings
data for a Scene, you must use the Unity Editor to create and assign a Lighting Settings Asset, or use a script to create, configure, and assign a LightingSettings
object. For more information and code examples, see the LightingSettings API documentation.