Unity - Scripting API: Lightmapping
class in UnityEditor
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Description
Allows to control the lightmapping job.
Static Properties
| Property | Description |
|---|---|
| bakedGI | This property is now obsolete. Use LightingSettings.bakedGI. |
| bakeOnSceneLoad | Determines whether lighting data should be generated when loading a scene, for scenes that have not already been baked. |
| buildProgress | Returns the current lightmapping build progress or 0 if Lightmapping.isRunning is false. |
| isRunning | Returns true when the bake job is running, false otherwise (Read Only). |
| lightingDataAsset | The lighting data asset used by the active Scene. |
| lightingSettings | The LightingSettings that will be used for the current Scene. Will throw an exception if it is null. |
| lightingSettingsDefaults | Default LightingSettings that Unity uses for Scenes where lightingSettings is not assigned. (Read only) |
| realtimeGI | This property is now obsolete. Use LightingSettings.realtimeGI. |
Events
| Event | Description |
|---|---|
| bakeCancelled | Event which is called when bake job is cancelled. |
| bakeCompleted | Event which is called when bake job is completed. Only called when LightingSettings.autoGenerate is set to false. |
| bakeStarted | Event which is called when a bake is started. Only called when LightingSettings.autoGenerate is set to false. |
| lightingDataAssetCleared | Event which is called when a LightingData asset is removed from the project. |
| lightingDataCleared | Event which is called when baked Global Illumination data is cleared from the scene and from renderers. |
| lightingDataUpdated | Event which is called when any lighting data is updated as part of the GI backing process. |
| started | Delegate which is called when bake job is started. |