# SetLightIndexMap(NativeArray<int>)

> If a RenderPipeline sorts or otherwise modifies the VisibleLight list, an index remap will be necessary to properly make use of per-object light lists.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.6/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public void SetLightIndexMap(NativeArray<int> lightIndexMap)
```

### Parameters

**** (\[NativeArray\<int>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Array with light indices that map from [VisibleLight](/engine/6000.6/script-reference/unityengine/rendering/visiblelight.md) to internal per-object light lists.

### Remarks

If an element of the array is set to -1, the light corresponding to that element will be disabled. Additional Resources:: [CullingResults.GetLightIndexMap](/engine/6000.6/script-reference/unityengine/rendering/cullingresults/getlightindexmap.md), [CullingResults](/engine/6000.6/script-reference/unityengine/rendering/cullingresults.md).
