Class MaterialReferenceManager
Inheritance
MaterialReferenceManager
Namespace: TMPro
Syntax
public class MaterialReferenceManager
Properties
instance
Get a singleton instance of the registry
Declaration
public static MaterialReferenceManager instance { get; }
Property Value
Methods
AddColorGradientPreset(Int32, 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(Int32, Material)
Add new Material reference to dictionary.
Declaration
public static void AddFontMaterial(int hashCode, Material material)
Parameters
Type |
Name |
Description |
Int32 |
hashCode |
|
Material |
material |
|
AddSpriteAsset(Int32, 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(Int32, 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(Int32, 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(Int32, out Material)
Function returning the Font Material corresponding to the provided hash code.
Declaration
public static bool TryGetMaterial(int hashCode, out Material material)
Parameters
Type |
Name |
Description |
Int32 |
hashCode |
|
Material |
material |
|
Returns
TryGetSpriteAsset(Int32, 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