docs.unity3d.com
    Show / Hide Table of Contents

    Class MaterialReferenceManager

    Inheritance
    Object
    MaterialReferenceManager
    Namespace: TMPro
    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(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
    Type Name Description
    Int32 hashCode
    Material material

    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
    Type Description
    Boolean

    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
    Type Description
    Boolean

    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
    Type Description
    Boolean

    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
    Type Description
    Boolean

    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
    Type Description
    Boolean

    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
    Type Description
    Boolean
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023