# GetSharedIndexArray()

> Indices into shared values. For example, given source array: [A,A,A,B,B,C,C,A,B] shared values are: [A,B,C] shared index array would contain: [0,0,0,1,1,2,2,0,1]

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public NativeArray<int> GetSharedIndexArray()
```

### Returns

| Type                                                                                   | Description                                                                                                     |
| -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [NativeArray\<int>](/engine/7000.0/script-reference/unity/collections/nativearray1.md) | Index NativeArray where each element refers to the index of a shared value in a list of shared (unique) values. |
