docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MaterialReferenceManager

    Inheritance
    object
    MaterialReferenceManager
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    Type Description
    MaterialReferenceManager

    Methods

    AddColorGradientPreset(int, TMP_ColorGradient)

    Add new Color Gradient Preset to dictionary.

    Declaration
    public static void AddColorGradientPreset(int hashCode, TMP_ColorGradient spriteAsset)
    Parameters
    Type Name Description
    int hashCode
    TMP_ColorGradient spriteAsset

    AddFontAsset(TMP_FontAsset)

    Add new font asset reference to dictionary.

    Declaration
    public static void AddFontAsset(TMP_FontAsset fontAsset)
    Parameters
    Type Name Description
    TMP_FontAsset fontAsset

    AddFontMaterial(int, Material)

    Add new Material reference to dictionary.

    Declaration
    public static void AddFontMaterial(int hashCode, Material material)
    Parameters
    Type Name Description
    int hashCode
    Material material

    AddSpriteAsset(int, TMP_SpriteAsset)

    Add new Sprite Asset to dictionary.

    Declaration
    public static void AddSpriteAsset(int hashCode, TMP_SpriteAsset spriteAsset)
    Parameters
    Type Name Description
    int hashCode
    TMP_SpriteAsset spriteAsset

    AddSpriteAsset(TMP_SpriteAsset)

    Add new Sprite Asset to dictionary.

    Declaration
    public static void AddSpriteAsset(TMP_SpriteAsset spriteAsset)
    Parameters
    Type Name Description
    TMP_SpriteAsset spriteAsset

    Contains(TMP_FontAsset)

    Function to check if the font asset is already referenced.

    Declaration
    public bool Contains(TMP_FontAsset font)
    Parameters
    Type Name Description
    TMP_FontAsset font
    Returns
    Type Description
    bool

    Contains(TMP_SpriteAsset)

    Function to check if the sprite asset is already referenced.

    Declaration
    public bool Contains(TMP_SpriteAsset sprite)
    Parameters
    Type Name Description
    TMP_SpriteAsset sprite
    Returns
    Type Description
    bool

    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
    Type Name Description
    int hashCode
    TMP_ColorGradient gradientPreset
    Returns
    Type Description
    bool

    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
    Type Name Description
    int hashCode
    TMP_FontAsset fontAsset
    Returns
    Type Description
    bool

    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
    Type Name Description
    int hashCode
    Material material
    Returns
    Type Description
    bool

    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
    Type Name Description
    int hashCode
    TMP_SpriteAsset spriteAsset
    Returns
    Type Description
    bool
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)