Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

DataUtility

Namespace: UnityEngine.Sprites

Description

Helper utilities for accessing Sprite data.

Static Functions

GetInnerUVInner UV's of the Sprite.
GetMinSizeMinimum width and height of the Sprite.
GetOuterUVOuter UV's of the Sprite.
GetPaddingReturn the padding on the sprite.
GetSpriteIndicesReturns the generated Sprite mesh indices.
GetSpriteMeshReturns the generated Sprite mesh positions.
GetSpriteTextureReturns the generated Sprite texture. If Sprite is packed, it is possible to query for both source and atlas textures.
GetSpriteUVsReturns the generated Sprite mesh uvs.