Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

public static Texture2D GetSpriteTexture(Sprite sprite, bool getAtlasData)

Parameters

sprite


getAtlasData

If Sprite is packed, it is possible to access data as if it was on the atlas texture.

Returns

Type

Description

Texture2D

Remarks

Note that the sprite atlas cache must be up to date for this API to return valid data.