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, TextColorGradient)
Add new Color Gradient Preset to dictionary.
Declaration
public static void AddColorGradientPreset(int hashCode, TextColorGradient spriteAsset)
Parameters
Type |
Name |
Description |
Int32 |
hashCode |
|
UnityEngine.TextCore.Text.TextColorGradient |
spriteAsset |
|
AddFontAsset(FontAsset)
Add new font asset reference to dictionary.
Declaration
public static void AddFontAsset(FontAsset fontAsset)
Parameters
Type |
Name |
Description |
UnityEngine.TextCore.Text.FontAsset |
fontAsset |
|
AddFontMaterial(Int32, Material)
Add new Material reference to dictionary.
Declaration
public static void AddFontMaterial(int hashCode, Material material)
Parameters
AddSpriteAsset(Int32, SpriteAsset)
Add new Sprite Asset to dictionary.
Declaration
public static void AddSpriteAsset(int hashCode, SpriteAsset spriteAsset)
Parameters
Type |
Name |
Description |
Int32 |
hashCode |
|
UnityEngine.TextCore.Text.SpriteAsset |
spriteAsset |
|
AddSpriteAsset(SpriteAsset)
Add new Sprite Asset to dictionary.
Declaration
public static void AddSpriteAsset(SpriteAsset spriteAsset)
Parameters
Type |
Name |
Description |
UnityEngine.TextCore.Text.SpriteAsset |
spriteAsset |
|
Contains(FontAsset)
Function to check if the font asset is already referenced.
Declaration
public bool Contains(FontAsset font)
Parameters
Type |
Name |
Description |
UnityEngine.TextCore.Text.FontAsset |
font |
|
Returns
Contains(SpriteAsset)
Function to check if the sprite asset is already referenced.
Declaration
public bool Contains(SpriteAsset sprite)
Parameters
Type |
Name |
Description |
UnityEngine.TextCore.Text.SpriteAsset |
sprite |
|
Returns
TryGetColorGradientPreset(Int32, out TextColorGradient)
Function returning the Color Gradient Preset corresponding to the provided hash code.
Declaration
public static bool TryGetColorGradientPreset(int hashCode, out TextColorGradient gradientPreset)
Parameters
Type |
Name |
Description |
Int32 |
hashCode |
|
UnityEngine.TextCore.Text.TextColorGradient |
gradientPreset |
|
Returns
TryGetFontAsset(Int32, out FontAsset)
Function returning the Font Asset corresponding to the provided hash code.
Declaration
public static bool TryGetFontAsset(int hashCode, out FontAsset fontAsset)
Parameters
Type |
Name |
Description |
Int32 |
hashCode |
|
UnityEngine.TextCore.Text.FontAsset |
fontAsset |
|
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
Returns
TryGetSpriteAsset(Int32, out SpriteAsset)
Function returning the Sprite Asset corresponding to the provided hash code.
Declaration
public static bool TryGetSpriteAsset(int hashCode, out SpriteAsset spriteAsset)
Parameters
Type |
Name |
Description |
Int32 |
hashCode |
|
UnityEngine.TextCore.Text.SpriteAsset |
spriteAsset |
|
Returns