Legacy Documentation: Version 5.4
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

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

Sumbission failed

For some reason your suggested change could not be submitted. Please try again 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.

Before starting the job the bake settings can be set via LightmapEditorSettings.

See Also: LightmapEditorSettings.

Static Variables

bakedGIIs baked GI enabled?
bounceBoostBoost the albedo.
buildProgressReturns the current lightmapping build progress or 0 if Lightmapping.isRunning is false.
completedDelegate which is called when bake job is completed.
giWorkflowModeThe lightmap baking workflow mode used. Iterative mode is default, but you can switch to on demand mode which bakes only when the user presses the bake button.
indirectOutputScaleScale for indirect lighting.
isRunningReturns true when the bake job is running, false otherwise (Read Only).
lightingDataAssetThe lighting data asset used by the active scene.
realtimeGIIs realtime GI enabled?

Static Functions

BakeStars a synchronous bake job.
BakeAsyncStarts an asynchronous bake job.
BakeLightProbesOnlyStarts a synchronous bake job, but only bakes light probes.
BakeLightProbesOnlyAsyncStarts an asynchronous bake job, but only bakes light probes.
BakeMultipleScenesBakes an array of scenes.
BakeReflectionProbeStarts a synchronous bake job for the probe.
BakeSelectedStarts a synchronous bake job for the selected objects.
BakeSelectedAsyncStarts an asynchronous bake job for the selected objects.
CancelCancels the currently running asynchronous bake job.
ClearDeletes all lightmap assets and makes all lights behave as if they weren't baked yet.
ClearDiskCacheClears the cache used by lightmaps, reflection probes and default reflection.
ClearLightingDataAssetRemove the lighting data asset used by the current scene.
GetTerrainGIChunksGet how many chunks the terrain is divided into for GI baking.
TetrahedralizeCalculates a Delaunay Tetrahedralization of the 'positions' point set - the same way the lightmapper.

Delegates

OnCompletedFunctionDelegate used by Lightmapping.completed callback.