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, TMP_ColorGradient)

    Add new Color Gradient Preset to dictionary.

    Declaration
    public static void AddColorGradientPreset(int hashCode, TMP_ColorGradient spriteAsset)
    Parameters
    Type Name Description
    Int32 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(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
    Type Name Description
    Int32 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
    Boolean

    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
    Boolean

    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
    Type Name Description
    Int32 hashCode
    TMP_ColorGradient gradientPreset
    Returns
    Type Description
    Boolean

    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
    Type Name Description
    Int32 hashCode
    TMP_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 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
    Int32 hashCode
    TMP_SpriteAsset spriteAsset
    Returns
    Type Description
    Boolean
    In This Article
    • Properties
      • instance
    • Methods
      • AddColorGradientPreset(Int32, TMP_ColorGradient)
      • AddFontAsset(TMP_FontAsset)
      • AddFontMaterial(Int32, Material)
      • AddSpriteAsset(Int32, TMP_SpriteAsset)
      • AddSpriteAsset(TMP_SpriteAsset)
      • Contains(TMP_FontAsset)
      • Contains(TMP_SpriteAsset)
      • TryGetColorGradientPreset(Int32, out TMP_ColorGradient)
      • TryGetFontAsset(Int32, out TMP_FontAsset)
      • TryGetMaterial(Int32, out Material)
      • TryGetSpriteAsset(Int32, out TMP_SpriteAsset)
    Back to top
    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