文档

Unity Engine

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.
阅读时间1 分钟最后更新于 2 小时前

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.