Version: 2019.1
Experimental: this API is experimental and might be changed or removed in the future.

SpriteEditorExtension.GetSpriteID

Switch to Manual
public static GUID GetSpriteID (Sprite sprite);

Parameters

spriteThe Sprite to query.

Returns

GUID GUID stored in the Sprite.

Description

Gets the Sprite's GUID.

During Sprite Asset generation, you can identify which SpriteRect was used to generate the Sprite. This is done by matching the GUID return from this method and SpriteRect.spriteID.