Class TMP_TextInfo
Class which contains information about every element contained within the text object.
Namespace: TMPro
Assembly: Unity.TextMeshPro.dll
Syntax
[Serializable]
public class TMP_TextInfo
Constructors
TMP_TextInfo()
Declaration
TMP_TextInfo(TMP_Text)
Declaration
public TMP_TextInfo(TMP_Text textComponent)
Parameters
| Type |
Name |
Description |
| TMP_Text |
textComponent |
|
Fields
characterCount
Declaration
public int characterCount
Field Value
characterInfo
Declaration
[NonSerialized]
public TMP_CharacterInfo[] characterInfo
Field Value
lineCount
Declaration
Field Value
lineInfo
Declaration
[NonSerialized]
public TMP_LineInfo[] lineInfo
Field Value
linkCount
Declaration
Field Value
linkInfo
Declaration
[NonSerialized]
public TMP_LinkInfo[] linkInfo
Field Value
materialCount
Declaration
Field Value
meshInfo
Declaration
[NonSerialized]
public TMP_MeshInfo[] meshInfo
Field Value
pageCount
Declaration
Field Value
pageInfo
Declaration
[NonSerialized]
public TMP_PageInfo[] pageInfo
Field Value
spaceCount
Declaration
Field Value
spriteCount
Declaration
Field Value
textComponent
Declaration
public TMP_Text textComponent
Field Value
wordCount
Declaration
Field Value
wordInfo
Declaration
[NonSerialized]
public TMP_WordInfo[] wordInfo
Field Value
Methods
ClearAllMeshInfo()
Function to clear the content of all the MeshInfo arrays while preserving their Triangles, Normals and Tangents.
Declaration
public void ClearAllMeshInfo()
ClearMeshInfo(bool)
Function to clear the content of the MeshInfo array while preserving the Triangles, Normals and Tangents.
Declaration
public void ClearMeshInfo(bool updateMesh)
Parameters
| Type |
Name |
Description |
| bool |
updateMesh |
|
ClearUnusedVertices(MaterialReference[])
Marks unused vertices as degenerate.
Declaration
public void ClearUnusedVertices(MaterialReference[] materials)
Parameters
| Type |
Name |
Description |
| MaterialReference[] |
materials |
Parallel material references for each sub-mesh entry; reserved for per-material vertex ranges when clearing unused vertices.
|
CopyMeshInfoVertexData()
Function to copy the MeshInfo Arrays and their primary vertex data content.
Declaration
public TMP_MeshInfo[] CopyMeshInfoVertexData()
Returns
ResetVertexLayout(bool)
Clears all mesh data and reconfigures the vertex structures to support either standard quads or volumetric (3D) character geometry.
Declaration
public void ResetVertexLayout(bool isVolumetric)
Parameters
| Type |
Name |
Description |
| bool |
isVolumetric |
When true, subsequent mesh growth uses eight vertices per glyph; otherwise four vertices per glyph.
|
Resize<T>(ref T[], int)
Resizes any of the structure contained in the TMP_TextInfo class.
Declaration
public static void Resize<T>(ref T[] array, int size)
Parameters
| Type |
Name |
Description |
| T[] |
array |
The array to resize (passed by reference).
|
| int |
size |
The required number of elements; actual size may be rounded up to next power of two.
|
Type Parameters
| Name |
Description |
| T |
Element type of the array.
|
Resize<T>(ref T[], int, bool)
Resizes any of the structure contained in the TMP_TextInfo class.
Declaration
public static void Resize<T>(ref T[] array, int size, bool isBlockAllocated)
Parameters
| Type |
Name |
Description |
| T[] |
array |
The array to resize (passed by reference).
|
| int |
size |
The required number of elements; when isBlockAllocated is true, rounded up to next power of two.
|
| bool |
isBlockAllocated |
When true, size is rounded up to the next power of two for block allocation.
|
Type Parameters
| Name |
Description |
| T |
Element type of the array.
|