Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
TMPro.TMP_SpriteAsset Class Reference
Inheritance diagram for TMPro.TMP_SpriteAsset:
TMPro.TMP_Asset

Public Member Functions

int GetSpriteIndexFromHashcode (int hashCode)
 Function which returns the sprite index using the hashcode of the name More...
 
int GetSpriteIndexFromName (string name)
 Returns the index of the sprite for the given name. More...
 
int GetSpriteIndexFromUnicode (int unicode)
 Returns the index of the sprite for the given unicode value. More...
 
void 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. More...
 

Static Public Member Functions

static TMP_SpriteAsset SearchForSpriteByHashCode (TMP_SpriteAsset spriteAsset, int hashCode, bool includeFallbacks, out int spriteIndex)
 Search the given sprite asset and fallbacks for a sprite whose hash code value of its name matches the target hash code. More...
 
static TMP_SpriteAsset SearchForSpriteByUnicode (TMP_SpriteAsset spriteAsset, int unicode, bool includeFallbacks, out int spriteIndex)
 Search through the given sprite asset and its fallbacks for the specified sprite matching the given unicode character. More...
 

Public Attributes

List< TMP_SpriteAssetfallbackSpriteAssets
 Dictionary used to lookup the index of a given sprite based on a Unicode value. More...
 
List< TMP_SpritespriteInfoList
 
Texture spriteSheet
 
- Public Attributes inherited from TMPro.TMP_Asset
int hashCode
 HashCode based on the name of the asset. More...
 
Material material
 The material used by this asset. More...
 
int materialHashCode
 HashCode based on the name of the material assigned to this asset. More...
 

Static Public Attributes

static TMP_SpriteAsset m_defaultSpriteAsset
 

Properties

static TMP_SpriteAsset defaultSpriteAsset [get]
 Static reference to the default font asset included with TextMesh Pro. More...
 

Member Function Documentation

int TMPro.TMP_SpriteAsset.GetSpriteIndexFromHashcode ( int  hashCode)
inline

Function which returns the sprite index using the hashcode of the name

Parameters
hashCode
Returns
int TMPro.TMP_SpriteAsset.GetSpriteIndexFromName ( string  name)
inline

Returns the index of the sprite for the given name.

Parameters
name
Returns
int TMPro.TMP_SpriteAsset.GetSpriteIndexFromUnicode ( int  unicode)
inline

Returns the index of the sprite for the given unicode value.

Parameters
unicode
Returns
static TMP_SpriteAsset TMPro.TMP_SpriteAsset.SearchForSpriteByHashCode ( TMP_SpriteAsset  spriteAsset,
int  hashCode,
bool  includeFallbacks,
out int  spriteIndex 
)
inlinestatic

Search the given sprite asset and fallbacks for a sprite whose hash code value of its name matches the target hash code.

Parameters
spriteAssetThe Sprite Asset to search for the given sprite whose name matches the hashcode value
hashCodeThe hash code value matching the name of the sprite
includeFallbacksInclude fallback sprite assets in the search
spriteIndexThe index of the sprite matching the provided hash code
Returns
The Sprite Asset that contains the sprite
static TMP_SpriteAsset TMPro.TMP_SpriteAsset.SearchForSpriteByUnicode ( TMP_SpriteAsset  spriteAsset,
int  unicode,
bool  includeFallbacks,
out int  spriteIndex 
)
inlinestatic

Search through the given sprite asset and its fallbacks for the specified sprite matching the given unicode character.

Parameters
spriteAssetThe font asset to search for the given character.
unicodeThe character to find.
glyphout parameter containing the glyph for the specified character (if found).
Returns
void TMPro.TMP_SpriteAsset.UpdateLookupTables ( )
inline

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.

Member Data Documentation

List<TMP_SpriteAsset> TMPro.TMP_SpriteAsset.fallbackSpriteAssets

Dictionary used to lookup the index of a given sprite based on a Unicode value.

List which contains the Fallback font assets for this font.

TMP_SpriteAsset TMPro.TMP_SpriteAsset.m_defaultSpriteAsset
static
List<TMP_Sprite> TMPro.TMP_SpriteAsset.spriteInfoList
Texture TMPro.TMP_SpriteAsset.spriteSheet

Property Documentation

TMP_SpriteAsset TMPro.TMP_SpriteAsset.defaultSpriteAsset
staticget

Static reference to the default font asset included with TextMesh Pro.


The documentation for this class was generated from the following file: