# GetSharedValueIndicesBySharedIndex(int)

> Array of indices into source NativeArray which share the same shared value For example, given source array: [A,A,A,B,B,C,C,A,B] shared values are: [A,B,C] Shared value counts: [4,3,2] (number of occurrences of a shared value) Shared value start offsets (into sorted indices): [0,4,7] Given the index 0 into the shared value array (A), the returned array would contain [0,1,2,7] (indices into the source array which point to the shared value A).

## Definition

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

```csharp
public NativeArray<int> GetSharedValueIndicesBySharedIndex(int sharedValueIndex)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of shared value

### Returns

| Type                                                                                   | Description                                                                    |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [NativeArray\<int>](/engine/7000.0/script-reference/unity/collections/nativearray1.md) | Index NativeArray where each element refers to an index into the source array. |
