Class TextMeshPro
Inherited Members
Namespace: TMPro
Assembly: solution.dll
Syntax
[DisallowMultipleComponent]
[RequireComponent(typeof(MeshRenderer))]
[AddComponentMenu("Mesh/TextMeshPro - Text")]
[ExecuteAlways]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.textmeshpro@3.0")]
public class TextMeshPro : TMP_Text, ICanvasElement, IClippable, IMaskable, IMaterialModifier, ILayoutElement
Properties
Name | Description |
---|---|
auto |
Determines if the size of the text container will be adjusted to fit the text object when it is first created. |
mask |
Sets the mask type |
mesh | Returns the mesh assigned to the text object. |
mesh |
Returns the Mesh Filter of the text object. |
renderer | Returns the rendered assigned to the text object. |
sorting |
Sets the Renderer's sorting Layer ID |
sorting |
Sets the Renderer's sorting order within the assigned layer. |
text |
Returns a reference to the Text Container |
transform | Returns a reference to the Transform |
Methods
Name | Description |
---|---|
Awake() | |
Calculate |
|
Calculate |
|
Clear |
Function to clear the geometry of the Primary and Sub Text objects. |
Compute |
Update the margin width and height |
Destroy |
Destroy Sub Mesh Objects |
Force |
Function to force regeneration of the text object before its normal process time. This is useful when changes to the text object properties need to be applied immediately. |
Generate |
This is the main function that is responsible for creating / displaying the text. |
Get |
Method returning the compound bounds of the text object and child sub objects. |
Get |
Function called internally when a new material is assigned via the fontMaterial property. |
Get |
Method returning instances of the materials used by the text object. |
Get |
Method returning an array containing the materials used by the text object. |
Get |
Method to return the local corners of the Text Container or RectTransform. |
Get |
Function used to evaluate the length of a text string. |
Load |
Method which derived classes need to override to load Font Assets. |
On |
|
On |
|
On |
|
On |
|
On |
|
On |
|
Rebuild(Canvas |
|
Set |
Method to Enable or Disable child SubMesh objects. |
Set |
|
Set |
|
Set |
Method used to determine the number of visible characters and required buffer allocations. |
Set |
Set the culling mode on the material. |
Set |
Function called internally to set the face color of the material. This will results in an instance of the material. |
Set |
|
Set |
Function used to set the mask type and coordinates in World Space |
Set |
Function used to set the mask type, coordinates and softness |
Set |
Schedule updating of the material used by the text object. |
Set |
Function called internally to set the outline color of the material. This will results in an instance of the material. |
Set |
Function called internally to set the outline thickness property of the material. This will results in an instance of the material. |
Set |
Set the Render Queue and ZTest mode on the current material |
Set |
Function called internally when a new shared material is assigned via the fontSharedMaterial property. |
Set |
Method used to assign new materials to the text and sub text objects. |
Set |
Schedule rebuilding of the text geometry. |
Update |
|
Update |
Function to update the geometry of the main and sub text objects. |
Update |
|
Update |
Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script. |
Update |
Function to upload the updated vertex data and renderer. |
Update |
Function to upload the updated vertex data and renderer. |
Events
Name | Description |
---|---|
On |
Event to allow users to modify the content of the text info before the text is rendered. |