Sprite

class in UnityEngine

/

Inherits from:Object

Switch to Manual

Description

Описывает объект Sprite для использования в 2D геймплее.

"Спрайты" - 2D графические объекты, используемые для персонажей, бутафории, снарядов и других элементов 2D геймплея. Графика получается из растровых изображений - Texture2D. Класс Sprite прежде всего определяет часть изображения, которая должна быть использована для определенного спрайта. Затем эта информация используется компонентом SpriteRenderer на игровом объекте для реального отображения графики.

См. также: SpriteRenderer класс.

Variables

associatedAlphaSplitTextureReturns the texture that contains the alpha channel from the source texture. Unity generates this texture under the hood for sprites that have alpha in the source, and need to be compressed using techniques like ETC1.Returns NULL if there is no associated alpha texture for the source sprite. This is the case if the sprite has not been setup to use ETC1 compression.
borderВозвращает границы размеров спрайта.
bounds Bounds of the Sprite, specified by its center and extents in world space units.
packedВозвращает true если спрайт запакован в атлас.
packingModeЕсли спрайт запакован (см. Sprite.packed), возвращает SpritePackingMode.
packingRotationЕсли спрайт запакован (см. Sprite.packed), возвращает SpritePackingRotation.