Renderer.lightmapIndex Manual     Reference     Scripting  
Scripting > Runtime Classes > Renderer
Renderer.lightmapIndex

var lightmapIndex : int

Description

The index of the lightmap applied to this renderer.

The index refers to lightmaps array in LightmapSettings class. A value of -1 means no lightmap has been assigned, which is the default. The index can't be larger than 254.

A scene can have several lightmaps stored in it, and Renderer can use one of those lightmaps. This makes it possible to use the same material on multiple objects, while each object can refer to a different lightmap or different portion of the same lightmap.

See Also: LightmapSettings class, lightmapTilingOffset property, ShaderLab properties.