# GetSpriteID(Sprite)

> Gets the Sprite's GUID.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.U2D](/engine/6000.3/script-reference/unityeditor/u2d.md)
* **Assembly:** UnityEditor

```csharp
public static GUID GetSpriteID(this Sprite sprite)
```

### Parameters

**** (\[Sprite]\(/engine/6000.3/script-reference/unityengine/sprite)): The Sprite to query.

### Returns

| Type | Description                |
| ---- | -------------------------- |
| GUID | GUID stored in the Sprite. |

### Remarks

During Sprite Asset generation, you can identify which [SpriteRect](/engine/6000.3/script-reference/unityengine/sprite/rect.md) was used to generate the Sprite. This is done by matching the GUID return from this method and spriteID.
