Class MaterialReferenceManager
Inheritance
MaterialReferenceManager
Namespace: TMPro
Assembly: Unity.TextMeshPro.dll
Syntax
public class MaterialReferenceManager
Properties
instance
Get a singleton instance of the registry
Declaration
public static MaterialReferenceManager instance { get; }
Property Value
Methods
AddColorGradientPreset(int, TMP_ColorGradient)
Add new Color Gradient Preset to dictionary.
Declaration
public static void AddColorGradientPreset(int hashCode, TMP_ColorGradient spriteAsset)
Parameters
AddFontAsset(TMP_FontAsset)
Add new font asset reference to dictionary.
Declaration
public static void AddFontAsset(TMP_FontAsset fontAsset)
Parameters
AddFontMaterial(int, Material)
Add new Material reference to dictionary.
Declaration
public static void AddFontMaterial(int hashCode, Material material)
Parameters
AddSpriteAsset(int, TMP_SpriteAsset)
Add new Sprite Asset to dictionary.
Declaration
public static void AddSpriteAsset(int hashCode, TMP_SpriteAsset spriteAsset)
Parameters
AddSpriteAsset(TMP_SpriteAsset)
Add new Sprite Asset to dictionary.
Declaration
public static void AddSpriteAsset(TMP_SpriteAsset spriteAsset)
Parameters
Contains(TMP_FontAsset)
Function to check if the font asset is already referenced.
Declaration
public bool Contains(TMP_FontAsset font)
Parameters
Returns
Contains(TMP_SpriteAsset)
Function to check if the sprite asset is already referenced.
Declaration
public bool Contains(TMP_SpriteAsset sprite)
Parameters
Returns
TryGetColorGradientPreset(int, out TMP_ColorGradient)
Function returning the Color Gradient Preset corresponding to the provided hash code.
Declaration
public static bool TryGetColorGradientPreset(int hashCode, out TMP_ColorGradient gradientPreset)
Parameters
Returns
TryGetFontAsset(int, out TMP_FontAsset)
Function returning the Font Asset corresponding to the provided hash code.
Declaration
public static bool TryGetFontAsset(int hashCode, out TMP_FontAsset fontAsset)
Parameters
Returns
TryGetMaterial(int, out Material)
Function returning the Font Material corresponding to the provided hash code.
Declaration
public static bool TryGetMaterial(int hashCode, out Material material)
Parameters
Returns
TryGetSpriteAsset(int, out TMP_SpriteAsset)
Function returning the Sprite Asset corresponding to the provided hash code.
Declaration
public static bool TryGetSpriteAsset(int hashCode, out TMP_SpriteAsset spriteAsset)
Parameters
Returns