Unity - Scripting API: Lightmapping

class in UnityEditor

Suggest a change

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.

Close

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.

Close

Cancel

Description

Allows to control the lightmapping job.

Static Properties

Property Description
bakedGIThis property is now obsolete. Use LightingSettings.bakedGI.
bakeOnSceneLoadDetermines whether lighting data should be generated when loading a scene, for scenes that have not already been baked.
buildProgressReturns the current lightmapping build progress or 0 if Lightmapping.isRunning is false.
isRunningReturns true when the bake job is running, false otherwise (Read Only).
lightingDataAssetThe lighting data asset used by the active Scene.
lightingSettingsThe LightingSettings that will be used for the current Scene. Will throw an exception if it is null.
lightingSettingsDefaultsDefault LightingSettings that Unity uses for Scenes where lightingSettings is not assigned. (Read only)
realtimeGIThis property is now obsolete. Use LightingSettings.realtimeGI.

Events

Event Description
bakeCancelledEvent which is called when bake job is cancelled.
bakeCompletedEvent which is called when bake job is completed. Only called when LightingSettings.autoGenerate is set to false.
bakeStartedEvent which is called when a bake is started. Only called when LightingSettings.autoGenerate is set to false.
lightingDataAssetClearedEvent which is called when a LightingData asset is removed from the project.
lightingDataClearedEvent which is called when baked Global Illumination data is cleared from the scene and from renderers.
lightingDataUpdatedEvent which is called when any lighting data is updated as part of the GI backing process.
startedDelegate which is called when bake job is started.