Class TMP_SpriteAsset
Inherited Members
Namespace: TMPro
Assembly: solution.dll
Syntax
[ExcludeFromPreset]
public class TMP_SpriteAsset : TMP_Asset
Fields
| Name | Description |
|---|---|
| fallbackSpriteAssets | List which contains the Fallback font assets for this font. |
| spriteInfoList | |
| spriteSheet |
Properties
| Name | Description |
|---|---|
| faceInfo | Information about the sprite asset's face. |
| spriteCharacterLookupTable | Dictionary used to lookup sprite characters by their unicode value. |
| spriteCharacterTable | |
| spriteGlyphTable | |
| version | The version of the sprite asset class. Version 1.1.0 updates the asset data structure to be compatible with new font asset structure. |
Methods
| Name | Description |
|---|---|
| GetSpriteIndexFromHashcode(int) | Function which returns the sprite index using the hashcode of the name |
| GetSpriteIndexFromName(string) | Returns the index of the sprite for the given name. |
| GetSpriteIndexFromUnicode(uint) | Returns the index of the sprite for the given unicode value. |
| SearchForSpriteByHashCode(TMP_SpriteAsset, int, bool, out int) | Search the given sprite asset and fallbacks for a sprite whose hash code value of its name matches the target hash code. |
| SearchForSpriteByUnicode(TMP_SpriteAsset, uint, bool, out int) | Search through the given sprite asset and its fallbacks for the specified sprite matching the given unicode character. |
| SortGlyphTable() | Sort the sprite glyph table by glyph index. |
| UpdateLookupTables() | Function to update the sprite name and unicode lookup tables. This function should be called when a sprite's name or unicode value changes or when a new sprite is added. |