Struct MaterialReference
Namespace: TMPro
Syntax
public struct MaterialReference
Constructors
MaterialReference(Int32, TMP_FontAsset, TMP_SpriteAsset, Material, Single)
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
Type |
Description |
Material |
|
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
Type |
Description |
Material |
|
padding
Declaration
Field Value
referenceCount
Declaration
public int referenceCount
Field Value
spriteAsset
Declaration
public TMP_SpriteAsset spriteAsset
Field Value
Methods
AddMaterialReference(Material, TMP_FontAsset, MaterialReference[], Dictionary<Int32, Int32>)
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, MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup)
Parameters
Returns
AddMaterialReference(Material, TMP_SpriteAsset, MaterialReference[], Dictionary<Int32, Int32>)
Declaration
public static int AddMaterialReference(Material material, TMP_SpriteAsset spriteAsset, 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