# GetSortedIndices()

> Indices into source NativeArray sorted by value

## Definition

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

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

### Returns

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