Class TextMeshProUGUI
Inherited Members
Namespace: TMPro
Assembly: solution.dll
Syntax
[DisallowMultipleComponent]
[RequireComponent(typeof(RectTransform))]
[RequireComponent(typeof(CanvasRenderer))]
[AddComponentMenu("UI/TextMeshPro - Text (UI)", 11)]
[ExecuteAlways]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.textmeshpro@3.0")]
public class TextMeshProUGUI : TMP_Text, ICanvasElement, IClippable, IMaskable, IMaterialModifier, ILayoutElement
Fields
Name | Description |
---|---|
m_sub |
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. |
canvas |
Reference to the CanvasRenderer used by the text object. |
mask |
Sets the masking offset from the bounds of the object |
material |
Get the material that will be used for rendering. |
mesh | Reference to the Mesh used by the text object. |
Methods
Name | Description |
---|---|
Awake() | |
Calculate |
Function called by Unity when the horizontal layout needs to be recalculated. |
Calculate |
Function called by Unity when the vertical layout needs to be recalculated. |
Clear |
Function to clear the geometry of the Primary and Sub Text objects. |
Compute |
Update the margin width and height |
Cull(Rect, bool) | Override of the Cull function to provide for the ability to override the culling of the text object. |
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 |
|
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. |
Internal |
Tweens the alpha of the CanvasRenderer color associated with this Graphic. |
Internal |
Tweens the CanvasRenderer color associated with this Graphic. |
Load |
Method which derived classes need to override to load Font Assets. |
On |
|
On |
|
On |
|
On |
|
On |
|
On |
|
On |
|
Rebuild(Canvas |
|
Recalculate |
Method called when the state of a parent changes. |
Set |
Method to Enable or Disable child SubMesh objects. |
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 |
|
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 |
|
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. |