# pickingIndex

> Specifies the picking index value that the first pickable object uses to write to the picking render texture.

## Definition

* **Type:** Property
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public int pickingIndex { get; }
```

### Remarks

The picking index must be encoded to a [Vector4](/engine/6000.5/script-reference/unityengine/vector4.md) `selectionId` value that uses [HandleUtility.EncodeSelectionId](/engine/6000.5/script-reference/unityeditor/handleutility/encodeselectionid.md), and output from the shader. If you are rendering more than one pickable object in the callback, increment the `pickingIndex` for every additional object.

Additional Resources: [HandleUtility.EncodeSelectionId](/engine/6000.5/script-reference/unityeditor/handleutility/encodeselectionid.md).
