# LightmapData

> Data of a lightmap.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public sealed class LightmapData
```

## Remarks

A Scene can have several lightmaps stored in it, and [Renderer](/engine/6000.7/script-reference/unityengine/renderer.md) components can use 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.

You must set the following properties or Unity might render objects incorrectly:

* `lightmapDir` if you use [LightmapsMode.CombinedDirectional](/engine/6000.7/script-reference/unityengine/lightmapsmode/combineddirectional.md).
* `shadowMask` if you use [MixedLightingMode.Shadowmask](/engine/6000.7/script-reference/unityengine/mixedlightingmode/shadowmask.md).

Additional Resources: [LightmapSettings](/engine/6000.7/script-reference/unityengine/lightmapsettings.md) class, [Renderer.lightmapIndex](/engine/6000.7/script-reference/unityengine/renderer/lightmapindex.md)

## Properties

| Property                                                                                   | Description                                                               |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
| [lightmapColor](/engine/6000.7/script-reference/unityengine/lightmapdata/lightmapcolor.md) | Lightmap storing color of incoming light.                                 |
| [lightmapDir](/engine/6000.7/script-reference/unityengine/lightmapdata/lightmapdir.md)     | Lightmap storing dominant direction of incoming light.                    |
| [shadowMask](/engine/6000.7/script-reference/unityengine/lightmapdata/shadowmask.md)       | Texture storing occlusion mask per light (ShadowMask, up to four lights). |
