Lightmapping

Allows to control the lightmapping job.

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.

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

See Also: LightmapEditorSettings.

Class Variables
isRunning

Returns true when the bake job is running, false otherwise (Read Only).

Class Functions
BakeAsync

Starts an asynchronous bake job.

Bake

Stars a synchronous bake job.

BakeSelectedAsync

Starts an asynchronous bake job for the selected objects.

BakeSelected

Stars a synchronous bake job for the selected objects.

BakeLightProbesOnlyAsync

Starts an asynchronous bake job, but only bakes light probes.

BakeLightProbesOnly

Starts a synchronous bake job, but only bakes light probes.

Cancel

Cancels the currently running asynchronous bake job.

Clear

Deletes all lightmap assets and makes all lights behave as if they weren't baked yet.

Tetrahedralize

Calculates a Delaunay Tetrahedralization of the 'positions' point set - the same way the lightmapper.