# GetSharedValueIndicesBySourceIndex(int)

> Array of indices into shared value indices NativeArray which share the same source value For example, given Source NativeArray: [A,A,A,B,B,C,C,A,B] shared values are: [A,B,C] Shared value indices: [0,0,0,1,1,2,2,0,1] Given the index 2 into the source array (A), the returned array would contain: [0,1,2,7] (indices in SharedValueIndices that have a value of 0, i.e. where A is in the shared values)

## Definition

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

```csharp
public NativeArray<int> GetSharedValueIndicesBySourceIndex(int indexIntoSourceBuffer)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of source 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 shared value indices array. |
