GetSpriteTexture(Sprite, bool)
Returns the generated Sprite texture. If Sprite is packed, it is possible to query for both source and atlas textures.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEditor.Sprites
- Assembly: UnityEditor.CoreModule
public static Texture2D GetSpriteTexture(Sprite sprite, bool getAtlasData)
Parameters
Returns
Type | Description |
|---|---|
| Texture2D |
Remarks
Note that the sprite atlas cache must be up to date for this API to return valid data.