Struct MaterialReference
Namespace: TMPro
Assembly: Unity.TextMeshPro.dll
Syntax
public struct MaterialReference
Constructors
MaterialReference(int, TMP_FontAsset, TMP_SpriteAsset, Material, float)
Constructor for new Material Reference.
Declaration
public MaterialReference(int index, TMP_FontAsset fontAsset, TMP_SpriteAsset spriteAsset, Material material, float padding)
Parameters
Fields
fallbackMaterial
Declaration
public Material fallbackMaterial
Field Value
fontAsset
Declaration
public TMP_FontAsset fontAsset
Field Value
index
Declaration
Field Value
isDefaultMaterial
Declaration
public bool isDefaultMaterial
Field Value
isFallbackMaterial
Declaration
public bool isFallbackMaterial
Field Value
material
Declaration
Field Value
padding
Declaration
Field Value
referenceCount
Declaration
public int referenceCount
Field Value
spriteAsset
Declaration
public TMP_SpriteAsset spriteAsset
Field Value
Methods
AddMaterialReference(Material, TMP_FontAsset, ref MaterialReference[], Dictionary<int, int>)
Function to add a new material reference and returning its index in the material reference array.
Declaration
public static int AddMaterialReference(Material material, TMP_FontAsset fontAsset, ref MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup)
Parameters
Returns
AddMaterialReference(Material, TMP_SpriteAsset, ref MaterialReference[], Dictionary<int, int>)
Declaration
public static int AddMaterialReference(Material material, TMP_SpriteAsset spriteAsset, ref MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup)
Parameters
Returns
Contains(MaterialReference[], TMP_FontAsset)
Function to check if a certain font asset is contained in the material reference array.
Declaration
public static bool Contains(MaterialReference[] materialReferences, TMP_FontAsset fontAsset)
Parameters
Returns