Struct MaterialReference
Namespace: TMPro
Assembly: Unity.TextMeshPro.dll
Syntax
public struct MaterialReference
Constructors
MaterialReference(int, FontAsset, SpriteAsset, Material, float)
Constructor for new Material Reference.
Declaration
public MaterialReference(int index, FontAsset fontAsset, SpriteAsset spriteAsset, Material material, float padding)
Parameters
Type |
Name |
Description |
int |
index |
|
FontAsset |
fontAsset |
|
SpriteAsset |
spriteAsset |
|
Material |
material |
|
float |
padding |
|
Fields
fallbackMaterial
Declaration
public Material fallbackMaterial
Field Value
fontAsset
Declaration
public FontAsset fontAsset
Field Value
Type |
Description |
FontAsset |
|
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 SpriteAsset spriteAsset
Field Value
Type |
Description |
SpriteAsset |
|
Methods
AddMaterialReference(Material, 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, FontAsset fontAsset, ref MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup)
Parameters
Returns
AddMaterialReference(Material, SpriteAsset, ref MaterialReference[], Dictionary<int, int>)
Declaration
public static int AddMaterialReference(Material material, SpriteAsset spriteAsset, ref MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup)
Parameters
Returns
Contains(MaterialReference[], FontAsset)
Function to check if a certain font asset is contained in the material reference array.
Declaration
public static bool Contains(MaterialReference[] materialReferences, FontAsset fontAsset)
Parameters
Returns