Legacy Documentation: Version 5.5
LanguageEnglish
  • C#
  • JS

Script language

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

Light.bakedIndex

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

Switch to Manual
public var bakedIndex: int;
public int bakedIndex;

Description

A unique index, used internally for identifying lights contributing to lightmaps and/or light probes.

When manually assembling a lightmapped scene set this index appropriately, so that the light doesn't affect lightmapped objects twice, but at the same time affects dynamic objects. Having a unique index for each light helps to mix realtime and baked shadow by identifying the amount of light contribution each particular light had on a lightmap or lightprobe. -2 means that light is not baked, -1 is reserved for internal use. See Also: Light component and isBaked.