# GetSpriteIndices(Sprite, bool)

> Returns the generated Sprite mesh indices.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Sprites](/engine/6000.6/script-reference/unityeditor/sprites.md)
* **Assembly:** UnityEditor.CoreModule

> **Warning:**
>
> **Deprecated.** Use Sprite.triangles API instead. This data is the same for packed and unpacked sprites.

```csharp
public static ushort[] GetSpriteIndices(Sprite sprite, bool getAtlasData)
```

### Parameters

**** (\[Sprite]\(/engine/6000.6/script-reference/unityengine/sprite)): If [Sprite](/engine/6000.6/script-reference/unityengine/sprite.md) is packed, it is possible to access data as if it was on the atlas texture.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)):&#x20;

### Returns

| Type                                                               | Description |
| ------------------------------------------------------------------ | ----------- |
| [ushort\[\]](https://learn.microsoft.com/dotnet/api/system.uint16) |             |
