Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | List of all members
TMPro.TMP_Text Class Reference

Base class which contains common properties and functions shared between the TextMeshPro and TextMeshProUGUI component. More...

Inheritance diagram for TMPro.TMP_Text:
TMPro.TextMeshPro TMPro.TextMeshProUGUI

Public Member Functions

virtual void ClearMesh ()
 Function to clear the geometry of the Primary and Sub Text objects. More...
 
virtual void ClearMesh (bool uploadGeometry)
 Function to clear the geometry of the Primary and Sub Text objects. More...
 
override void CrossFadeAlpha (float alpha, float duration, bool ignoreTimeScale)
 Tweens the alpha of the CanvasRenderer color associated with this Graphic. More...
 
override void CrossFadeColor (Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha)
 
virtual void ForceMeshUpdate ()
 Function to force the regeneration of the text object. More...
 
virtual void ForceMeshUpdate (bool ignoreActiveState)
 Method used for resetting vertex layout when switching to and from Volumetric Text mode. More...
 
virtual string GetParsedText ()
 Function which returns the text after it has been parsed and rich text tags removed. More...
 
Vector2 GetPreferredValues ()
 Function to Calculate the Preferred Width and Height of the text object. More...
 
Vector2 GetPreferredValues (float width, float height)
 Function to Calculate the Preferred Width and Height of the text object given the provided width and height. More...
 
Vector2 GetPreferredValues (string text)
 Function to Calculate the Preferred Width and Height of the text object given a certain string. More...
 
Vector2 GetPreferredValues (string text, float width, float height)
 Function to Calculate the Preferred Width and Height of the text object given a certain string and size of text container. More...
 
Vector2 GetRenderedValues ()
 Method returning the rendered width and height of the text object. More...
 
Vector2 GetRenderedValues (bool onlyVisibleCharacters)
 
virtual TMP_TextInfo GetTextInfo (string text)
 Function used to evaluate the length of a text string. More...
 
void SetCharArray (char[] sourceText)
 Character array containing the text to be displayed. More...
 
void SetCharArray (char[] sourceText, int start, int length)
 Character array containing the text to be displayed. More...
 
void SetCharArray (int[] sourceText, int start, int length)
 Character array containing the text to be displayed. More...
 
void SetText (string text)
 
void SetText (string text, bool syncTextInputBox)
 
void SetText (string text, float arg0)
 
void SetText (string text, float arg0, float arg1)
 
void SetText (string text, float arg0, float arg1, float arg2)
 
void SetText (StringBuilder text)
 Set the text using a StringBuilder. More...
 
virtual void SetVertices (Vector3[] vertices)
 Function to push a new set of vertices to the mesh. More...
 
virtual void UpdateGeometry (Mesh mesh, int index)
 Function to force the regeneration of the text object. More...
 
virtual void UpdateMeshPadding ()
 Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script. More...
 
virtual void UpdateVertexData (TMP_VertexDataUpdateFlags flags)
 Function to push the updated vertex data into the mesh and renderer. More...
 
virtual void UpdateVertexData ()
 Function to push the updated vertex data into the mesh and renderer. More...
 

Protected Types

enum  TextInputSources { TextInputSources.Text = 0, TextInputSources.SetText = 1, TextInputSources.SetCharArray = 2, TextInputSources.String = 3 }
 

Protected Member Functions

void AddFloatToCharArray (float number, ref int index, int precision)
 Function used in conjunction with SetText() More...
 
void AddIntToCharArray (int number, ref int index, int precision)
 // Function used in conjunction with SetText() More...
 
virtual void AdjustLineOffset (int startIndex, int endIndex, float offset)
 Method to adjust line spacing as a result of using different fonts or font point size. More...
 
virtual Vector2 CalculatePreferredValues (float defaultFontSize, Vector2 marginSize, bool ignoreTextAutoSizing)
 Method to calculate the preferred width and height of the text object. More...
 
virtual void ClearSubMeshObjects ()
 Destroy Sub Mesh Objects. More...
 
virtual void ComputeMarginSize ()
 Function to force an update of the margin size. More...
 
float ConvertToFloat (char[] chars, int startIndex, int length)
 Extracts a float value from char[] assuming we know the position of the start, end and decimal point. More...
 
float ConvertToFloat (char[] chars, int startIndex, int length, out int lastIndex)
 Extracts a float value from char[] given a start index and length. More...
 
virtual Material CreateMaterialInstance (Material source)
 Method to set the materials of the text and sub text objects. More...
 
virtual void DrawTextHighlight (Vector3 start, Vector3 end, ref int index, Color32 highlightColor)
 
virtual void DrawUnderlineMesh (Vector3 start, Vector3 end, ref int index, float startScale, float endScale, float maxScale, float sdfScale, Color32 underlineColor)
 Method to add the underline geometry. More...
 
virtual void FillCharacterVertexBuffers (int i, int index_X4)
 Store vertex attributes into the appropriate TMP_MeshInfo. More...
 
virtual void FillCharacterVertexBuffers (int i, int index_X4, bool isVolumetric)
 
virtual void FillSpriteVertexBuffers (int i, int index_X4)
 Fill Vertex Buffers for Sprites More...
 
virtual void GenerateTextMesh ()
 Method which parses the text input, does the layout of the text as well as generating the geometry. More...
 
virtual Bounds GetCompoundBounds ()
 Method returning the compound bounds of the text object and child sub objects. More...
 
TMP_FontAsset GetFontAssetForWeight (int fontWeight)
 
virtual Material GetMaterial (Material mat)
 Function called internally when a new material is assigned via the fontMaterial property. More...
 
virtual Material[] GetMaterials (Material[] mats)
 Method returning instances of the materials used by the text object. More...
 
virtual float GetPaddingForMaterial ()
 Get the padding value for the currently assigned material More...
 
virtual float GetPaddingForMaterial (Material mat)
 Get the padding value for the given material More...
 
float GetPreferredHeight ()
 Method to calculate the preferred height of a text object. More...
 
float GetPreferredHeight (Vector2 margin)
 Method to calculate the preferred height of a text object. More...
 
float GetPreferredWidth ()
 Method to calculate the preferred width of a text object. More...
 
float GetPreferredWidth (Vector2 margin)
 Method to calculate the preferred width of a text object. More...
 
float GetRenderedHeight ()
 Method returning the rendered height of the text object. More...
 
float GetRenderedHeight (bool onlyVisibleCharacters)
 Method returning the rendered height of the text object. More...
 
float GetRenderedWidth ()
 Method returning the rendered width of the text object. More...
 
float GetRenderedWidth (bool onlyVisibleCharacters)
 Method returning the rendered width of the text object. More...
 
virtual Material[] GetSharedMaterials ()
 Method which returns an array containing the materials used by the text object. More...
 
void GetSpecialCharacters (TMP_FontAsset fontAsset)
 Method used to find and cache references to the Underline and Ellipsis characters. More...
 
Bounds GetTextBounds ()
 Method which returns the bounds of the text object; More...
 
Bounds GetTextBounds (bool onlyVisibleCharacters)
 Method which returns the bounds of the text object; More...
 
virtual Vector3[] GetTextContainerLocalCorners ()
 Method to return the local corners of the Text Container or RectTransform. More...
 
int GetUTF16 (string text, int i)
 Convert UTF-16 Hex to Char More...
 
int GetUTF16 (StringBuilder text, int i)
 Convert UTF-16 Hex to Char More...
 
int GetUTF32 (string text, int i)
 Convert UTF-32 Hex to Char More...
 
int GetUTF32 (StringBuilder text, int i)
 Convert UTF-32 Hex to Char More...
 
Color32 HexCharsToColor (char[] hexChars, int tagCount)
 Method to convert Hex color values to Color32 More...
 
Color32 HexCharsToColor (char[] hexChars, int startIndex, int length)
 Method to convert Hex Color values to Color32 More...
 
int HexToInt (char hex)
 Function to pack scale information in the UV2 Channel. More...
 
virtual void InternalCrossFadeAlpha (float alpha, float duration, bool ignoreTimeScale)
 
virtual void InternalCrossFadeColor (Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha)
 
void LoadDefaultSettings ()
 Internal function used to load the default settings of text objects. More...
 
virtual void LoadFontAsset ()
 Method which derived classes need to override to load Font Assets. More...
 
Vector2 PackUV (float x, float y, float scale)
 Function to pack scale information in the UV2 Channel. More...
 
float PackUV (float x, float y)
 
void ParseInputText ()
 Method to parse the input text based on its source More...
 
void ReplaceTagWithCharacter (int[] chars, int insertionIndex, int tagLength, char c)
 Replace a given number of characters (tag) in the array with a new character and shift subsequent characters in the array. More...
 
void ResizeLineExtents (int size)
 Function to increase the size of the Line Extents Array. More...
 
int RestoreWordWrappingState (ref WordWrapState state)
 Restore the State of various variables used in the mesh creation loop. More...
 
virtual void SaveGlyphVertexInfo (float padding, float style_padding, Color32 vertexColor)
 Store vertex information for each character. More...
 
virtual void SaveSpriteVertexInfo (Color32 vertexColor)
 Store vertex information for each sprite. More...
 
void SaveWordWrappingState (ref WordWrapState state, int index, int count)
 Function used in conjunction with GetTextInfo to figure out Array allocations. More...
 
virtual void SetActiveSubMeshes (bool state)
 Method to Enable or Disable child SubMesh objects. More...
 
virtual int SetArraySizes (int[] chars)
 Method used to determine the number of visible characters and required buffer allocations. More...
 
virtual void SetCulling ()
 Set the culling mode on the material. More...
 
virtual void SetFaceColor (Color32 color)
 Function called internally to set the face color of the material. This will results in an instance of the material. More...
 
virtual void SetFontBaseMaterial (Material mat)
 Function called internally when assigning a new base material. More...
 
virtual void SetOutlineColor (Color32 color)
 Function called internally to set the outline color of the material. This will results in an instance of the material. More...
 
virtual void SetOutlineThickness (float thickness)
 Function called internally to set the outline thickness property of the material. This will results in an instance of the material. More...
 
virtual void SetShaderDepth ()
 Set the Render Queue and ZTest mode on the current material More...
 
virtual void SetSharedMaterial (Material mat)
 Function called internally when a new shared material is assigned via the fontSharedMaterial property. More...
 
virtual void SetSharedMaterials (Material[] materials)
 
void SetTextArrayToCharArray (char[] sourceText, ref int[] charBuffer)
 Copies Content of formatted SetText() to charBuffer. More...
 
void SetTextSortingOrder (VertexSortingOrder order)
 Function to control the sorting of the geometry of the text object. More...
 
void SetTextSortingOrder (int[] order)
 Function to sort the geometry of the text object in accordance to the provided order. More...
 
void SetVertexColorGradient (TMP_ColorGradient gradient)
 
void StringBuilderToIntArray (StringBuilder sourceText, ref int[] charBuffer)
 Copy contents of StringBuilder into int array. More...
 
void StringToCharArray (string sourceText, ref int[] charBuffer)
 Method to store the content of a string into an integer array. More...
 
bool ValidateHtmlTag (int[] chars, int startIndex, out int endIndex)
 Function to identify and validate the rich tag. Returns the position of the > if the tag was valid. More...
 

Protected Attributes

bool checkPaddingRequired
 
TMP_XmlTagStack< int > m_actionStack = new TMP_XmlTagStack<int>(new int[16])
 
float[] m_attributeParameterValues = new float[16]
 
bool m_autoSizeTextContainer
 
float m_baselineOffset
 
TMP_XmlTagStack< float > m_baselineOffsetStack = new TMP_XmlTagStack<float>(new float[16])
 
TMP_Glyph m_cached_Ellipsis_GlyphInfo
 
TMP_TextElement m_cached_TextElement
 
TMP_Glyph m_cached_Underline_GlyphInfo
 
int[] m_char_buffer
 
int m_characterCount
 
float m_characterSpacing = 0
 
float m_charWidthAdjDelta = 0
 
float m_charWidthMaxAdj = 0f
 
TMP_ColorGradient m_colorGradientPreset
 
TMP_XmlTagStack
< TMP_ColorGradient
m_colorGradientStack = new TMP_XmlTagStack<TMP_ColorGradient>(new TMP_ColorGradient[16])
 
TMP_XmlTagStack< Color32 > m_colorStack = new TMP_XmlTagStack<Color32>(new Color32[16])
 
float m_cSpacing = 0
 
TMP_FontAsset m_currentFontAsset
 
float m_currentFontSize
 
Material m_currentMaterial
 
int m_currentMaterialIndex
 
TMP_SpriteAsset m_currentSpriteAsset
 
TMP_SpriteAsset m_defaultSpriteAsset
 
bool m_enableAutoSizing
 
bool m_enableExtraPadding = false
 
bool m_enableKerning
 
bool m_enableVertexGradient
 
bool m_enableWordWrapping = false
 
Color32 m_faceColor = Color.white
 
int m_firstCharacterOfLine
 
int m_firstOverflowCharacterIndex = -1
 
int m_firstVisibleCharacter
 
int m_firstVisibleCharacterOfLine
 
float m_flexibleHeight = -1f
 
float m_flexibleWidth = -1f
 
TMP_FontAsset m_fontAsset
 
Color m_fontColor = Color.white
 
Color32 m_fontColor32 = Color.white
 
VertexGradient m_fontColorGradient = new VertexGradient(Color.white)
 
TMP_ColorGradient m_fontColorGradientPreset
 
Material m_fontMaterial
 
Material[] m_fontMaterials
 
float m_fontScale
 
float m_fontScaleMultiplier
 
Material[] m_fontSharedMaterials
 
float m_fontSize = 36
 
float m_fontSizeBase = 36
 
float m_fontSizeMax = 0
 
float m_fontSizeMin = 0
 
FontStyles m_fontStyle = FontStyles.Normal
 
TMP_BasicXmlTagStack m_fontStyleStack
 
int m_fontWeight = 400
 
int m_fontWeightInternal
 
TMP_XmlTagStack< int > m_fontWeightStack = new TMP_XmlTagStack<int>(new int[16])
 
Matrix4x4 m_FXMatrix
 
VertexSortingOrder m_geometrySortingOrder
 
bool m_havePropertiesChanged
 
Color32 m_highlightColor = s_colorWhite
 
TMP_XmlTagStack< Color32 > m_highlightColorStack = new TMP_XmlTagStack<Color32>(new Color32[16])
 
TextureMappingOptions m_horizontalMapping = TextureMappingOptions.Character
 
Color32 m_htmlColor = new Color(255, 255, 255, 128)
 
char[] m_htmlTag = new char[128]
 
bool m_ignoreActiveState
 
bool m_ignoreCulling = true
 
bool m_ignoreRectMaskCulling
 
TMP_XmlTagStack< float > m_indentStack = new TMP_XmlTagStack<float>(new float[16])
 
char[] m_input_CharArray = new char[256]
 
TextInputSources m_inputSource
 
bool m_isAlignmentEnumConverted
 
bool m_isAwake
 
bool m_isCalculateSizeRequired = false
 
bool m_isCalculatingPreferredValues
 
bool m_isCharacterWrappingEnabled = false
 
bool m_isCullingEnabled = false
 
bool m_isFXMatrixSet
 
bool m_isIgnoringAlignment
 
bool m_isInputParsingRequired = false
 
bool m_isLayoutDirty
 
bool m_isLinkedTextComponent
 
bool m_isMaterialDirty
 
bool m_isNewPage = false
 
bool m_isNonBreakingSpace = false
 
bool m_isOrthographic = false
 
bool m_isOverlay = false
 
bool m_isParsingText
 
bool m_isPreferredHeightDirty
 
bool m_isPreferredWidthDirty
 
bool m_isRichText = true
 
bool m_isRightToLeft = false
 
bool m_isSDFShader
 
bool m_isTextTruncated
 
bool m_isUsingBold = false
 
bool m_isUsingLegacyAnimationComponent
 
bool m_isVolumetricText
 
int m_lastCharacterOfLine
 
int m_lastVisibleCharacterOfLine
 
bool m_layoutAlreadyDirty
 
LayoutElement m_LayoutElement
 
int m_layoutPriority = 0
 
float m_lineHeight = TMP_Math.FLOAT_UNSET
 
TextAlignmentOptions m_lineJustification
 
TMP_XmlTagStack
< TextAlignmentOptions
m_lineJustificationStack = new TMP_XmlTagStack<TextAlignmentOptions>(new TextAlignmentOptions[16])
 
int m_lineNumber
 
float m_lineOffset
 
float m_lineSpacing = 0
 
float m_lineSpacingDelta = 0
 
float m_lineSpacingMax = 0
 
int m_lineVisibleCharacterCount
 
TMP_Text m_linkedTextComponent
 
Vector4 m_margin = new Vector4(0, 0, 0, 0)
 
float m_marginHeight
 
float m_marginLeft
 
float m_marginRight
 
float m_marginWidth
 
Dictionary< int, int > m_materialReferenceIndexLookup = new Dictionary<int, int>()
 
MaterialReference[] m_materialReferences = new MaterialReference[32]
 
TMP_XmlTagStack
< MaterialReference
m_materialReferenceStack = new TMP_XmlTagStack<MaterialReference>(new MaterialReference[16])
 
float m_maxAscender
 
float m_maxCapHeight
 
float m_maxDescender
 
float m_maxFontSize
 
float m_maxHeight
 
float m_maxLineAscender
 
float m_maxLineDescender
 
int m_maxVisibleCharacters = 99999
 
int m_maxVisibleLines = 99999
 
int m_maxVisibleWords = 99999
 
float m_maxWidth
 
Mesh m_mesh
 
Extents m_meshExtents
 
float m_minFontSize
 
float m_minHeight
 
float m_minWidth
 
float m_monoSpacing = 0
 
Color32 m_outlineColor = Color.black
 
float m_outlineWidth = 0.0f
 
TextOverflowModes m_overflowMode = TextOverflowModes.Overflow
 
bool m_overrideHtmlColors = false
 
float m_padding = 0
 
int m_pageNumber
 
int m_pageToDisplay = 1
 
float m_paragraphSpacing = 0
 
bool m_parseCtrlCharacters = true
 
float m_preferredHeight
 
float m_preferredWidth
 
RectTransform m_rectTransform
 
float m_renderedHeight
 
float m_renderedWidth
 
TextRenderFlags m_renderMode = TextRenderFlags.Render
 
WordWrapState m_SavedLineState = new WordWrapState()
 
WordWrapState m_SavedWordWrapState = new WordWrapState()
 
Material m_sharedMaterial
 
TMP_XmlTagStack< float > m_sizeStack = new TMP_XmlTagStack<float>(new float[16])
 
float m_spacing = 0
 
int m_spriteAnimationID
 
TMP_SpriteAnimator m_spriteAnimator
 
TMP_SpriteAsset m_spriteAsset
 
Color32 m_spriteColor
 
int m_spriteCount = 0
 
int m_spriteIndex
 
float m_startOfLineAscender
 
Color32 m_strikethroughColor = s_colorWhite
 
TMP_XmlTagStack< Color32 > m_strikethroughColorStack = new TMP_XmlTagStack<Color32>(new Color32[16])
 
FontStyles m_style = FontStyles.Normal
 
TMP_XmlTagStack< int > m_styleStack = new TMP_XmlTagStack<int>(new int[16])
 
float m_tabSpacing = 0
 
string m_text
 
TextAlignmentOptions m_textAlignment = TextAlignmentOptions.TopLeft
 
Vector3[] m_textContainerLocalCorners = new Vector3[4]
 
TMP_TextElementType m_textElementType
 
TMP_TextInfo m_textInfo
 
bool m_tintAllSprites
 
bool m_tintSprite
 
int m_totalCharacterCount
 
Transform m_transform
 
Color32 m_underlineColor = s_colorWhite
 
TMP_XmlTagStack< Color32 > m_underlineColorStack = new TMP_XmlTagStack<Color32>(new Color32[16])
 
bool m_useMaxVisibleDescender = true
 
float m_uvLineOffset = 0.0f
 
TextureMappingOptions m_verticalMapping = TextureMappingOptions.Character
 
bool m_verticesAlreadyDirty
 
float m_width = -1
 
float m_wordSpacing = 0
 
float m_wordWrappingRatios = 0.4f
 
float m_xAdvance
 
XML_TagAttribute[] m_xmlAttribute = new XML_TagAttribute[8]
 
string old_text
 
float tag_Indent = 0
 
float tag_LineIndent = 0
 
bool tag_NoParsing
 

Static Protected Attributes

static float k_LargeNegativeFloat = TMP_Math.FLOAT_MIN
 
static int k_LargeNegativeInt = TMP_Math.INT_MIN
 
static Vector2 k_LargeNegativeVector2 = new Vector2(TMP_Math.INT_MIN, TMP_Math.INT_MIN)
 
static float k_LargePositiveFloat = TMP_Math.FLOAT_MAX
 
static int k_LargePositiveInt = TMP_Math.INT_MAX
 
static Vector2 k_LargePositiveVector2 = new Vector2(TMP_Math.INT_MAX, TMP_Math.INT_MAX)
 
static Color32 s_colorWhite = new Color32(255, 255, 255, 255)
 

Properties

TextAlignmentOptions alignment [get, set]
 Text alignment options More...
 
float alpha [get, set]
 Sets the vertex color alpha value. More...
 
virtual bool autoSizeTextContainer [get, set]
 Enables control over setting the size of the text container to match the text object. More...
 
Bounds bounds [get]
 Returns the bounds of the mesh of the text object in world space. More...
 
float characterSpacing [get, set]
 Use the extents of the text geometry for alignment instead of font metrics. More...
 
float characterWidthAdjustment [get, set]
 Percentage the width of characters can be adjusted before text auto-sizing begins to reduce the point size. More...
 
override Color color [get, set]
 This is the default vertex color assigned to each vertices. Color tags will override vertex colors unless the overrideColorTags is set. More...
 
VertexGradient colorGradient [get, set]
 Sets the vertex colors for each of the 4 vertices of the character quads. More...
 
TMP_ColorGradient colorGradientPreset [get, set]
 Set the vertex colors of the 4 vertices of each character quads. More...
 
bool enableAutoSizing [get, set]
 Enable text auto-sizing More...
 
bool enableCulling [get, set]
 Sets the culling on the shaders. Note changing this value will result in an instance of the material. More...
 
bool enableKerning [get, set]
 Determines if kerning is enabled or disabled. More...
 
bool enableVertexGradient [get, set]
 Determines if Vertex Color Gradient should be used More...
 
bool enableWordWrapping [get, set]
 Controls whether or not word wrapping is applied. When disabled, the text will be displayed on a single line. More...
 
bool extraPadding [get, set]
 Adds extra padding around each character. This may be necessary when the displayed text is very small to prevent clipping. More...
 
Color32 faceColor [get, set]
 Sets the color of the _FaceColor property of the assigned material. Changing face color will result in an instance of the material. More...
 
int firstOverflowCharacterIndex [get]
 The first character which exceeds the vertical bounds of its text container. More...
 
int firstVisibleCharacter [get, set]
 The first character which should be made visible in conjunction with the Text Overflow Linked mode. More...
 
float flexibleHeight [get]
 
float flexibleWidth [get]
 
TMP_FontAsset font [get, set]
 The Font Asset to be assigned to this text object. More...
 
Material fontMaterial [get, set]
 The material to be assigned to this text object. An instance of the material will be assigned to the object's renderer. More...
 
virtual Material[] fontMaterials [get, set]
 The materials to be assigned to this text object. An instance of the materials will be assigned. More...
 
float fontScale [get]
 The scale of the current text. More...
 
virtual Material fontSharedMaterial [get, set]
 The material to be assigned to this text object. More...
 
virtual Material[] fontSharedMaterials [get, set]
 An array containing the materials used by the text object. More...
 
float fontSize [get, set]
 The point size of the font. More...
 
float fontSizeMax [get, set]
 Maximum point size of the font when text auto-sizing is enabled. More...
 
float fontSizeMin [get, set]
 Minimum point size of the font when text auto-sizing is enabled. More...
 
FontStyles fontStyle [get, set]
 The style of the text More...
 
int fontWeight [get, set]
 Control the weight of the font if an alternative font asset is assigned for the given weight in the font asset editor. More...
 
VertexSortingOrder geometrySortingOrder [get, set]
 Determines the sorting order of the geometry of the text object. More...
 
bool havePropertiesChanged [get, set]
 Property tracking if any of the text properties have changed. Flag is set before the text is regenerated. More...
 
TextureMappingOptions horizontalMapping [get, set]
 Controls how the face and outline textures will be applied to the text object. More...
 
bool ignoreRectMaskCulling [get, set]
 Controls whether or not the text object will be culled when using a 2D Rect Mask. More...
 
bool ignoreVisibility [get, set]
 Forces objects that are not visible to get refreshed. More...
 
bool isLinkedTextComponent [get, set]
 Indicates whether this text component is linked to another. More...
 
bool isOrthographic [get, set]
 Sets Perspective Correction to Zero for Orthographic Camera mode & 0.875f for Perspective Camera mode. More...
 
bool isOverlay [get, set]
 Sets the RenderQueue along with Ztest to force the text to be drawn last and on top of scene elements. More...
 
bool isRightToLeftText [get, set]
 
bool isTextOverflowing [get]
 Indicates if the text exceeds the vertical bounds of its text container. More...
 
bool isTextTruncated [get]
 Property indicating whether the text is Truncated or using Ellipsis. More...
 
bool isUsingBold [get]
 Property used in conjunction with padding calculation for the geometry. More...
 
bool isUsingLegacyAnimationComponent [get, set]
 Property to handle legacy animation component. More...
 
bool isVolumetricText [get, set]
 Determines if the geometry of the characters will be quads or volumetric (cubes). More...
 
LayoutElement layoutElement [get]
 
int layoutPriority [get]
 
float lineSpacing [get, set]
 The amount of additional spacing to add between each lines of text. More...
 
float lineSpacingAdjustment [get, set]
 The amount of potential line spacing adjustment before text auto sizing kicks in. More...
 
TMP_Text linkedTextComponent [get, set]
 The linked text component used for flowing the text from one text component to another. More...
 
float mappingUvLineOffset [get, set]
 Controls the UV Offset for the various texture mapping mode on the text object. More...
 
virtual Vector4 margin [get, set]
 The margins of the text object. More...
 
float maxHeight [get]
 
int maxVisibleCharacters [get, set]
 Allows to control how many characters are visible from the input. More...
 
int maxVisibleLines [get, set]
 Allows control over how many lines of text are displayed. More...
 
int maxVisibleWords [get, set]
 Allows to control how many words are visible from the input. More...
 
float maxWidth [get]
 
virtual Mesh mesh [get]
 The mesh used by the font asset and material assigned to the text object. More...
 
float minHeight [get]
 
float minWidth [get]
 
Color32 outlineColor [get, set]
 Sets the color of the _OutlineColor property of the assigned material. Changing outline color will result in an instance of the material. More...
 
float outlineWidth [get, set]
 Sets the thickness of the outline of the font. Setting this value will result in an instance of the material. More...
 
TextOverflowModes overflowMode [get, set]
 
bool overrideColorTags [get, set]
 This overrides the color tags forcing the vertex colors to be the default font color. More...
 
int pageToDisplay [get, set]
 Controls which page of text is shown More...
 
float paragraphSpacing [get, set]
 The amount of additional spacing to add between each lines of text. More...
 
bool parseCtrlCharacters [get, set]
 Enables or Disables parsing of CTRL characters in input text. More...
 
float pixelsPerUnit [get]
 
virtual float preferredHeight [get]
 Computed preferred height of the text object. More...
 
virtual float preferredWidth [get]
 Computed preferred width of the text object. More...
 
new RectTransform rectTransform [get]
 Returns are reference to the RectTransform More...
 
virtual float renderedHeight [get]
 Compute the rendered height of the text object. More...
 
virtual float renderedWidth [get]
 Compute the rendered width of the text object. More...
 
TextRenderFlags renderMode [get, set]
 Determines if the Mesh will be rendered. More...
 
bool richText [get, set]
 Enables or Disables Rich Text Tags More...
 
TMP_SpriteAnimator spriteAnimator [get]
 Component used to control wrapping of text following some arbitrary shape. More...
 
TMP_SpriteAsset spriteAsset [get, set]
 Default Sprite Asset used by the text object. More...
 
string text [get, set]
 A string containing the text to be displayed. More...
 
Bounds textBounds [get]
 Returns the bounds of the text of the text object. More...
 
TMP_TextInfo textInfo [get]
 Returns data about the text object which includes information about each character, word, line, link, etc. More...
 
bool tintAllSprites [get, set]
 Determines whether or not the sprite color is multiplies by the vertex color of the text. More...
 
new Transform transform [get]
 Returns are reference to the Transform More...
 
bool useMaxVisibleDescender [get, set]
 Determines if the text's vertical alignment will be adjusted based on visible descender of the text. More...
 
TextureMappingOptions verticalMapping [get, set]
 Controls how the face and outline textures will be applied to the text object. More...
 
float wordSpacing [get, set]
 The amount of additional spacing between words. More...
 
float wordWrappingRatios [get, set]
 Controls the blending between using character and word spacing to fill-in the space for justified text. More...
 

Detailed Description

Base class which contains common properties and functions shared between the TextMeshPro and TextMeshProUGUI component.

Member Enumeration Documentation

Enumerator
Text 
SetText 
SetCharArray 
String 

Member Function Documentation

void TMPro.TMP_Text.AddFloatToCharArray ( float  number,
ref int  index,
int  precision 
)
inlineprotected

Function used in conjunction with SetText()

Parameters
number
index
precision
void TMPro.TMP_Text.AddIntToCharArray ( int  number,
ref int  index,
int  precision 
)
inlineprotected

// Function used in conjunction with SetText()

Parameters
number
index
precision
virtual void TMPro.TMP_Text.AdjustLineOffset ( int  startIndex,
int  endIndex,
float  offset 
)
inlineprotectedvirtual

Method to adjust line spacing as a result of using different fonts or font point size.

Parameters
startIndex
endIndex
offset

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual Vector2 TMPro.TMP_Text.CalculatePreferredValues ( float  defaultFontSize,
Vector2  marginSize,
bool  ignoreTextAutoSizing 
)
inlineprotectedvirtual

Method to calculate the preferred width and height of the text object.

Returns
virtual void TMPro.TMP_Text.ClearMesh ( )
inlinevirtual

Function to clear the geometry of the Primary and Sub Text objects.

Reimplemented in TMPro.TextMeshProUGUI.

virtual void TMPro.TMP_Text.ClearMesh ( bool  uploadGeometry)
inlinevirtual

Function to clear the geometry of the Primary and Sub Text objects.

Reimplemented in TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.ClearSubMeshObjects ( )
inlineprotectedvirtual

Destroy Sub Mesh Objects.

Reimplemented in TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.ComputeMarginSize ( )
inlineprotectedvirtual

Function to force an update of the margin size.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

float TMPro.TMP_Text.ConvertToFloat ( char[]  chars,
int  startIndex,
int  length 
)
inlineprotected

Extracts a float value from char[] assuming we know the position of the start, end and decimal point.

Parameters
chars
startIndex
length
Returns
float TMPro.TMP_Text.ConvertToFloat ( char[]  chars,
int  startIndex,
int  length,
out int  lastIndex 
)
inlineprotected

Extracts a float value from char[] given a start index and length.

Parameters
chars

The Char[] containing the numerical sequence.

Parameters
startIndex

The index of the start of the numerical sequence.

Parameters
length

The length of the numerical sequence.

Parameters
lastIndex

Index of the last character in the validated sequence.

Returns
virtual Material TMPro.TMP_Text.CreateMaterialInstance ( Material  source)
inlineprotectedvirtual

Method to set the materials of the text and sub text objects.

Parameters
mats

Function used to create an instance of the material

Parameters
source
Returns
override void TMPro.TMP_Text.CrossFadeAlpha ( float  alpha,
float  duration,
bool  ignoreTimeScale 
)
inline

Tweens the alpha of the CanvasRenderer color associated with this Graphic.

Parameters
alphaTarget alpha.
durationDuration of the tween in seconds.
ignoreTimeScaleShould ignore Time.scale?
override void TMPro.TMP_Text.CrossFadeColor ( Color  targetColor,
float  duration,
bool  ignoreTimeScale,
bool  useAlpha 
)
inline

Tweens the CanvasRenderer color associated with this Graphic.

Parameters
targetColorTarget color.
durationTween duration.
ignoreTimeScaleShould ignore Time.scale?
useAlphaShould also Tween the alpha channel?
virtual void TMPro.TMP_Text.DrawTextHighlight ( Vector3  start,
Vector3  end,
ref int  index,
Color32  highlightColor 
)
inlineprotectedvirtual
virtual void TMPro.TMP_Text.DrawUnderlineMesh ( Vector3  start,
Vector3  end,
ref int  index,
float  startScale,
float  endScale,
float  maxScale,
float  sdfScale,
Color32  underlineColor 
)
inlineprotectedvirtual

Method to add the underline geometry.

Parameters
start
end
startScale
endScale
maxScale
underlineColor
virtual void TMPro.TMP_Text.FillCharacterVertexBuffers ( int  i,
int  index_X4 
)
inlineprotectedvirtual

Store vertex attributes into the appropriate TMP_MeshInfo.

Parameters
i
index_X4
virtual void TMPro.TMP_Text.FillCharacterVertexBuffers ( int  i,
int  index_X4,
bool  isVolumetric 
)
inlineprotectedvirtual
virtual void TMPro.TMP_Text.FillSpriteVertexBuffers ( int  i,
int  index_X4 
)
inlineprotectedvirtual

Fill Vertex Buffers for Sprites

Parameters
i
spriteIndex_X4
virtual void TMPro.TMP_Text.ForceMeshUpdate ( )
inlinevirtual

Function to force the regeneration of the text object.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.ForceMeshUpdate ( bool  ignoreActiveState)
inlinevirtual

Method used for resetting vertex layout when switching to and from Volumetric Text mode.

Parameters
updateMesh

Function to force the regeneration of the text object.

Parameters
ignoreActiveStateIf set to true, the text object will be regenerated regardless of is active state.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.GenerateTextMesh ( )
inlineprotectedvirtual

Method which parses the text input, does the layout of the text as well as generating the geometry.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual Bounds TMPro.TMP_Text.GetCompoundBounds ( )
inlineprotectedvirtual

Method returning the compound bounds of the text object and child sub objects.

Returns

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

TMP_FontAsset TMPro.TMP_Text.GetFontAssetForWeight ( int  fontWeight)
inlineprotected

Returns
Returns
virtual Material TMPro.TMP_Text.GetMaterial ( Material  mat)
inlineprotectedvirtual

Function called internally when a new material is assigned via the fontMaterial property.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual Material [] TMPro.TMP_Text.GetMaterials ( Material[]  mats)
inlineprotectedvirtual

Method returning instances of the materials used by the text object.

Returns

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual float TMPro.TMP_Text.GetPaddingForMaterial ( )
inlineprotectedvirtual

Get the padding value for the currently assigned material

Returns

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual float TMPro.TMP_Text.GetPaddingForMaterial ( Material  mat)
inlineprotectedvirtual

Get the padding value for the given material

Returns

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual string TMPro.TMP_Text.GetParsedText ( )
inlinevirtual

Function which returns the text after it has been parsed and rich text tags removed.

Returns
float TMPro.TMP_Text.GetPreferredHeight ( )
inlineprotected

Method to calculate the preferred height of a text object.

Returns
float TMPro.TMP_Text.GetPreferredHeight ( Vector2  margin)
inlineprotected

Method to calculate the preferred height of a text object.

Parameters
margin
Returns
Vector2 TMPro.TMP_Text.GetPreferredValues ( )
inline

Function to Calculate the Preferred Width and Height of the text object.

Returns
Vector2 TMPro.TMP_Text.GetPreferredValues ( float  width,
float  height 
)
inline

Function to Calculate the Preferred Width and Height of the text object given the provided width and height.

Returns
Vector2 TMPro.TMP_Text.GetPreferredValues ( string  text)
inline

Function to Calculate the Preferred Width and Height of the text object given a certain string.

Parameters
text
Returns
Vector2 TMPro.TMP_Text.GetPreferredValues ( string  text,
float  width,
float  height 
)
inline

Function to Calculate the Preferred Width and Height of the text object given a certain string and size of text container.

Parameters
text
Returns
float TMPro.TMP_Text.GetPreferredWidth ( )
inlineprotected

Method to calculate the preferred width of a text object.

Returns
float TMPro.TMP_Text.GetPreferredWidth ( Vector2  margin)
inlineprotected

Method to calculate the preferred width of a text object.

Parameters
margin
Returns
float TMPro.TMP_Text.GetRenderedHeight ( )
inlineprotected

Method returning the rendered height of the text object.

Returns
float TMPro.TMP_Text.GetRenderedHeight ( bool  onlyVisibleCharacters)
inlineprotected

Method returning the rendered height of the text object.

Returns
Vector2 TMPro.TMP_Text.GetRenderedValues ( )
inline

Method returning the rendered width and height of the text object.

Returns
Vector2 TMPro.TMP_Text.GetRenderedValues ( bool  onlyVisibleCharacters)
inline

Parameters
onlyVisibleCharactersShould returned value only factor in visible characters and exclude those greater than maxVisibleCharacters for instance.
Returns
float TMPro.TMP_Text.GetRenderedWidth ( )
inlineprotected

Method returning the rendered width of the text object.

Returns
float TMPro.TMP_Text.GetRenderedWidth ( bool  onlyVisibleCharacters)
inlineprotected

Method returning the rendered width of the text object.

Returns
virtual Material [] TMPro.TMP_Text.GetSharedMaterials ( )
inlineprotectedvirtual

Method which returns an array containing the materials used by the text object.

Returns

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

void TMPro.TMP_Text.GetSpecialCharacters ( TMP_FontAsset  fontAsset)
inlineprotected

Method used to find and cache references to the Underline and Ellipsis characters.

Bounds TMPro.TMP_Text.GetTextBounds ( )
inlineprotected

Method which returns the bounds of the text object;

Returns
Bounds TMPro.TMP_Text.GetTextBounds ( bool  onlyVisibleCharacters)
inlineprotected

Method which returns the bounds of the text object;

Parameters
onlyVisibleCharacters
Returns
virtual Vector3 [] TMPro.TMP_Text.GetTextContainerLocalCorners ( )
inlineprotectedvirtual

Method to return the local corners of the Text Container or RectTransform.

Returns

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual TMP_TextInfo TMPro.TMP_Text.GetTextInfo ( string  text)
inlinevirtual

Function used to evaluate the length of a text string.

Parameters
text
Returns

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

int TMPro.TMP_Text.GetUTF16 ( string  text,
int  i 
)
inlineprotected

Convert UTF-16 Hex to Char

Returns
The Unicode hex.
Parameters
iThe index.
int TMPro.TMP_Text.GetUTF16 ( StringBuilder  text,
int  i 
)
inlineprotected

Convert UTF-16 Hex to Char

Returns
The Unicode hex.
Parameters
iThe index.
int TMPro.TMP_Text.GetUTF32 ( string  text,
int  i 
)
inlineprotected

Convert UTF-32 Hex to Char

Returns
The Unicode hex.
Parameters
iThe index.
int TMPro.TMP_Text.GetUTF32 ( StringBuilder  text,
int  i 
)
inlineprotected

Convert UTF-32 Hex to Char

Returns
The Unicode hex.
Parameters
iThe index.
Color32 TMPro.TMP_Text.HexCharsToColor ( char[]  hexChars,
int  tagCount 
)
inlineprotected

Method to convert Hex color values to Color32

Parameters
hexChars
tagCount
Returns
Color32 TMPro.TMP_Text.HexCharsToColor ( char[]  hexChars,
int  startIndex,
int  length 
)
inlineprotected

Method to convert Hex Color values to Color32

Parameters
hexChars
startIndex
length
Returns
int TMPro.TMP_Text.HexToInt ( char  hex)
inlineprotected

Function to pack scale information in the UV2 Channel.

Parameters
x
y
scale
Returns
Parameters
x
y
Returns

Method to convert Hex to Int

Parameters
hex
Returns
virtual void TMPro.TMP_Text.InternalCrossFadeAlpha ( float  alpha,
float  duration,
bool  ignoreTimeScale 
)
inlineprotectedvirtual

Parameters
alpha
duration
ignoreTimeScale

Reimplemented in TMPro.TextMeshProUGUI.

virtual void TMPro.TMP_Text.InternalCrossFadeColor ( Color  targetColor,
float  duration,
bool  ignoreTimeScale,
bool  useAlpha 
)
inlineprotectedvirtual

Parameters
targetColor
duration
ignoreTimeScale
useAlpha
useRGB

Reimplemented in TMPro.TextMeshProUGUI.

void TMPro.TMP_Text.LoadDefaultSettings ( )
inlineprotected

Internal function used to load the default settings of text objects.

virtual void TMPro.TMP_Text.LoadFontAsset ( )
inlineprotectedvirtual

Method which derived classes need to override to load Font Assets.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

Vector2 TMPro.TMP_Text.PackUV ( float  x,
float  y,
float  scale 
)
inlineprotected

Function to pack scale information in the UV2 Channel.

Parameters
x
y
scale
Returns

Function to pack scale information in the UV2 Channel.

Parameters
x
y
scale
Returns
float TMPro.TMP_Text.PackUV ( float  x,
float  y 
)
inlineprotected

Parameters
x
y
Returns
void TMPro.TMP_Text.ParseInputText ( )
inlineprotected

Method to parse the input text based on its source

void TMPro.TMP_Text.ReplaceTagWithCharacter ( int[]  chars,
int  insertionIndex,
int  tagLength,
char  c 
)
inlineprotected

Replace a given number of characters (tag) in the array with a new character and shift subsequent characters in the array.

Parameters
charsArray which contains the text.
insertionIndexThe index of where the new character will be inserted
tagLengthLength of the tag being replaced.
cThe replacement character.
void TMPro.TMP_Text.ResizeLineExtents ( int  size)
inlineprotected

Function to increase the size of the Line Extents Array.

Parameters
size
int TMPro.TMP_Text.RestoreWordWrappingState ( ref WordWrapState  state)
inlineprotected

Restore the State of various variables used in the mesh creation loop.

Parameters
state
Returns
virtual void TMPro.TMP_Text.SaveGlyphVertexInfo ( float  padding,
float  style_padding,
Color32  vertexColor 
)
inlineprotectedvirtual

Store vertex information for each character.

Parameters
style_paddingStyle_padding.
vertexColorVertex color.
virtual void TMPro.TMP_Text.SaveSpriteVertexInfo ( Color32  vertexColor)
inlineprotectedvirtual

Store vertex information for each sprite.

Parameters
padding
style_padding
vertexColor
void TMPro.TMP_Text.SaveWordWrappingState ( ref WordWrapState  state,
int  index,
int  count 
)
inlineprotected

Function used in conjunction with GetTextInfo to figure out Array allocations.

Parameters
chars
Returns

Save the State of various variables used in the mesh creation loop in conjunction with Word Wrapping

Parameters
state
index
count
virtual void TMPro.TMP_Text.SetActiveSubMeshes ( bool  state)
inlineprotectedvirtual

Method to Enable or Disable child SubMesh objects.

Parameters
state

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual int TMPro.TMP_Text.SetArraySizes ( int[]  chars)
inlineprotectedvirtual

Method used to determine the number of visible characters and required buffer allocations.

Parameters
chars
Returns

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

void TMPro.TMP_Text.SetCharArray ( char[]  sourceText)
inline

Character array containing the text to be displayed.

Parameters
sourceText
void TMPro.TMP_Text.SetCharArray ( char[]  sourceText,
int  start,
int  length 
)
inline

Character array containing the text to be displayed.

Parameters
sourceText
void TMPro.TMP_Text.SetCharArray ( int[]  sourceText,
int  start,
int  length 
)
inline

Character array containing the text to be displayed.

Parameters
sourceText
virtual void TMPro.TMP_Text.SetCulling ( )
inlineprotectedvirtual

Set the culling mode on the material.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.SetFaceColor ( Color32  color)
inlineprotectedvirtual

Function called internally to set the face color of the material. This will results in an instance of the material.

Parameters
color

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.SetFontBaseMaterial ( Material  mat)
inlineprotectedvirtual

Function called internally when assigning a new base material.

Parameters
mat
virtual void TMPro.TMP_Text.SetOutlineColor ( Color32  color)
inlineprotectedvirtual

Function called internally to set the outline color of the material. This will results in an instance of the material.

Parameters
color

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.SetOutlineThickness ( float  thickness)
inlineprotectedvirtual

Function called internally to set the outline thickness property of the material. This will results in an instance of the material.

Parameters
thickness

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.SetShaderDepth ( )
inlineprotectedvirtual

Set the Render Queue and ZTest mode on the current material

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.SetSharedMaterial ( Material  mat)
inlineprotectedvirtual

Function called internally when a new shared material is assigned via the fontSharedMaterial property.

Parameters
mat

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.SetSharedMaterials ( Material[]  materials)
inlineprotectedvirtual

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

void TMPro.TMP_Text.SetText ( string  text)
inline

Parameters
text
void TMPro.TMP_Text.SetText ( string  text,
bool  syncTextInputBox 
)
inline

Parameters
text
void TMPro.TMP_Text.SetText ( string  text,
float  arg0 
)
inline

Formatted string containing a pattern and a value representing the text to be rendered.

ex. TextMeshPro.SetText ("Number is {0:1}.", 5.56f);

Template Parameters
T
Parameters
textString containing the pattern."</param> <param name="arg0">Value is a float.
void TMPro.TMP_Text.SetText ( string  text,
float  arg0,
float  arg1 
)
inline

Formatted string containing a pattern and a value representing the text to be rendered.

ex. TextMeshPro.SetText ("First number is {0} and second is {1:2}.", 10, 5.756f);

Template Parameters
T
Parameters
textString containing the pattern."</param> <param name="arg0">Value is a float.</param> <param name="arg1">Value is a float.
void TMPro.TMP_Text.SetText ( string  text,
float  arg0,
float  arg1,
float  arg2 
)
inline

Formatted string containing a pattern and a value representing the text to be rendered.

ex. TextMeshPro.SetText ("A = {0}, B = {1} and C = {2}.", 2, 5, 7);

Template Parameters
T
Parameters
textString containing the pattern."</param> <param name="arg0">Value is a float.</param> <param name="arg1">Value is a float.</param> <param name="arg2">Value is a float.
void TMPro.TMP_Text.SetText ( StringBuilder  text)
inline

Set the text using a StringBuilder.

Using a StringBuilder instead of concatenating strings prevents memory pollution with temporary objects.

Parameters
textStringBuilder with text to display.
void TMPro.TMP_Text.SetTextArrayToCharArray ( char[]  sourceText,
ref int[]  charBuffer 
)
inlineprotected

Copies Content of formatted SetText() to charBuffer.

Parameters
sourceText
charBuffer
void TMPro.TMP_Text.SetTextSortingOrder ( VertexSortingOrder  order)
inlineprotected

Function to control the sorting of the geometry of the text object.

void TMPro.TMP_Text.SetTextSortingOrder ( int[]  order)
inlineprotected

Function to sort the geometry of the text object in accordance to the provided order.

Parameters
order
void TMPro.TMP_Text.SetVertexColorGradient ( TMP_ColorGradient  gradient)
inlineprotected
virtual void TMPro.TMP_Text.SetVertices ( Vector3[]  vertices)
inlinevirtual

Function to push a new set of vertices to the mesh.

Parameters
vertices
void TMPro.TMP_Text.StringBuilderToIntArray ( StringBuilder  sourceText,
ref int[]  charBuffer 
)
inlineprotected

Copy contents of StringBuilder into int array.

Parameters
sourceTextText to copy.
charBufferArray to store contents.
void TMPro.TMP_Text.StringToCharArray ( string  sourceText,
ref int[]  charBuffer 
)
inlineprotected

Method to store the content of a string into an integer array.

Parameters
sourceText
charBuffer
virtual void TMPro.TMP_Text.UpdateGeometry ( Mesh  mesh,
int  index 
)
inlinevirtual

Function to force the regeneration of the text object.

Parameters
flagsFlags to control which portions of the geometry gets uploaded.

Function to update the geometry of the main and sub text objects.

Parameters
mesh
index

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.UpdateMeshPadding ( )
inlinevirtual

Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.UpdateVertexData ( TMP_VertexDataUpdateFlags  flags)
inlinevirtual

Function to push the updated vertex data into the mesh and renderer.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

virtual void TMPro.TMP_Text.UpdateVertexData ( )
inlinevirtual

Function to push the updated vertex data into the mesh and renderer.

Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.

bool TMPro.TMP_Text.ValidateHtmlTag ( int[]  chars,
int  startIndex,
out int  endIndex 
)
inlineprotected

Function to identify and validate the rich tag. Returns the position of the > if the tag was valid.

Parameters
chars
startIndex
endIndex
Returns

Member Data Documentation

bool TMPro.TMP_Text.checkPaddingRequired
protected
float TMPro.TMP_Text.k_LargeNegativeFloat = TMP_Math.FLOAT_MIN
staticprotected
int TMPro.TMP_Text.k_LargeNegativeInt = TMP_Math.INT_MIN
staticprotected
Vector2 TMPro.TMP_Text.k_LargeNegativeVector2 = new Vector2(TMP_Math.INT_MIN, TMP_Math.INT_MIN)
staticprotected
float TMPro.TMP_Text.k_LargePositiveFloat = TMP_Math.FLOAT_MAX
staticprotected
int TMPro.TMP_Text.k_LargePositiveInt = TMP_Math.INT_MAX
staticprotected
Vector2 TMPro.TMP_Text.k_LargePositiveVector2 = new Vector2(TMP_Math.INT_MAX, TMP_Math.INT_MAX)
staticprotected
TMP_XmlTagStack<int> TMPro.TMP_Text.m_actionStack = new TMP_XmlTagStack<int>(new int[16])
protected
float [] TMPro.TMP_Text.m_attributeParameterValues = new float[16]
protected
bool TMPro.TMP_Text.m_autoSizeTextContainer
protected
float TMPro.TMP_Text.m_baselineOffset
protected
TMP_XmlTagStack<float> TMPro.TMP_Text.m_baselineOffsetStack = new TMP_XmlTagStack<float>(new float[16])
protected
TMP_Glyph TMPro.TMP_Text.m_cached_Ellipsis_GlyphInfo
protected
TMP_TextElement TMPro.TMP_Text.m_cached_TextElement
protected
TMP_Glyph TMPro.TMP_Text.m_cached_Underline_GlyphInfo
protected
int [] TMPro.TMP_Text.m_char_buffer
protected
int TMPro.TMP_Text.m_characterCount
protected
float TMPro.TMP_Text.m_characterSpacing = 0
protected
float TMPro.TMP_Text.m_charWidthAdjDelta = 0
protected
float TMPro.TMP_Text.m_charWidthMaxAdj = 0f
protected
TMP_ColorGradient TMPro.TMP_Text.m_colorGradientPreset
protected
TMP_XmlTagStack<TMP_ColorGradient> TMPro.TMP_Text.m_colorGradientStack = new TMP_XmlTagStack<TMP_ColorGradient>(new TMP_ColorGradient[16])
protected
TMP_XmlTagStack<Color32> TMPro.TMP_Text.m_colorStack = new TMP_XmlTagStack<Color32>(new Color32[16])
protected
float TMPro.TMP_Text.m_cSpacing = 0
protected
TMP_FontAsset TMPro.TMP_Text.m_currentFontAsset
protected
float TMPro.TMP_Text.m_currentFontSize
protected
Material TMPro.TMP_Text.m_currentMaterial
protected
int TMPro.TMP_Text.m_currentMaterialIndex
protected
TMP_SpriteAsset TMPro.TMP_Text.m_currentSpriteAsset
protected
TMP_SpriteAsset TMPro.TMP_Text.m_defaultSpriteAsset
protected
bool TMPro.TMP_Text.m_enableAutoSizing
protected
bool TMPro.TMP_Text.m_enableExtraPadding = false
protected
bool TMPro.TMP_Text.m_enableKerning
protected
bool TMPro.TMP_Text.m_enableVertexGradient
protected
bool TMPro.TMP_Text.m_enableWordWrapping = false
protected
Color32 TMPro.TMP_Text.m_faceColor = Color.white
protected
int TMPro.TMP_Text.m_firstCharacterOfLine
protected
int TMPro.TMP_Text.m_firstOverflowCharacterIndex = -1
protected
int TMPro.TMP_Text.m_firstVisibleCharacter
protected
int TMPro.TMP_Text.m_firstVisibleCharacterOfLine
protected
float TMPro.TMP_Text.m_flexibleHeight = -1f
protected
float TMPro.TMP_Text.m_flexibleWidth = -1f
protected
TMP_FontAsset TMPro.TMP_Text.m_fontAsset
protected
Color TMPro.TMP_Text.m_fontColor = Color.white
protected
Color32 TMPro.TMP_Text.m_fontColor32 = Color.white
protected
VertexGradient TMPro.TMP_Text.m_fontColorGradient = new VertexGradient(Color.white)
protected
TMP_ColorGradient TMPro.TMP_Text.m_fontColorGradientPreset
protected
Material TMPro.TMP_Text.m_fontMaterial
protected
Material [] TMPro.TMP_Text.m_fontMaterials
protected
float TMPro.TMP_Text.m_fontScale
protected
float TMPro.TMP_Text.m_fontScaleMultiplier
protected
Material [] TMPro.TMP_Text.m_fontSharedMaterials
protected
float TMPro.TMP_Text.m_fontSize = 36
protected
float TMPro.TMP_Text.m_fontSizeBase = 36
protected
float TMPro.TMP_Text.m_fontSizeMax = 0
protected
float TMPro.TMP_Text.m_fontSizeMin = 0
protected
FontStyles TMPro.TMP_Text.m_fontStyle = FontStyles.Normal
protected
TMP_BasicXmlTagStack TMPro.TMP_Text.m_fontStyleStack
protected
int TMPro.TMP_Text.m_fontWeight = 400
protected
int TMPro.TMP_Text.m_fontWeightInternal
protected
TMP_XmlTagStack<int> TMPro.TMP_Text.m_fontWeightStack = new TMP_XmlTagStack<int>(new int[16])
protected
Matrix4x4 TMPro.TMP_Text.m_FXMatrix
protected
VertexSortingOrder TMPro.TMP_Text.m_geometrySortingOrder
protected
bool TMPro.TMP_Text.m_havePropertiesChanged
protected
Color32 TMPro.TMP_Text.m_highlightColor = s_colorWhite
protected
TMP_XmlTagStack<Color32> TMPro.TMP_Text.m_highlightColorStack = new TMP_XmlTagStack<Color32>(new Color32[16])
protected
TextureMappingOptions TMPro.TMP_Text.m_horizontalMapping = TextureMappingOptions.Character
protected
Color32 TMPro.TMP_Text.m_htmlColor = new Color(255, 255, 255, 128)
protected
char [] TMPro.TMP_Text.m_htmlTag = new char[128]
protected
bool TMPro.TMP_Text.m_ignoreActiveState
protected
bool TMPro.TMP_Text.m_ignoreCulling = true
protected
bool TMPro.TMP_Text.m_ignoreRectMaskCulling
protected
TMP_XmlTagStack<float> TMPro.TMP_Text.m_indentStack = new TMP_XmlTagStack<float>(new float[16])
protected
char [] TMPro.TMP_Text.m_input_CharArray = new char[256]
protected
TextInputSources TMPro.TMP_Text.m_inputSource
protected
bool TMPro.TMP_Text.m_isAlignmentEnumConverted
protected
bool TMPro.TMP_Text.m_isAwake
protected
bool TMPro.TMP_Text.m_isCalculateSizeRequired = false
protected
bool TMPro.TMP_Text.m_isCalculatingPreferredValues
protected
bool TMPro.TMP_Text.m_isCharacterWrappingEnabled = false
protected
bool TMPro.TMP_Text.m_isCullingEnabled = false
protected
bool TMPro.TMP_Text.m_isFXMatrixSet
protected
bool TMPro.TMP_Text.m_isIgnoringAlignment
protected
bool TMPro.TMP_Text.m_isInputParsingRequired = false
protected
bool TMPro.TMP_Text.m_isLayoutDirty
protected
bool TMPro.TMP_Text.m_isLinkedTextComponent
protected
bool TMPro.TMP_Text.m_isMaterialDirty
protected
bool TMPro.TMP_Text.m_isNewPage = false
protected
bool TMPro.TMP_Text.m_isNonBreakingSpace = false
protected
bool TMPro.TMP_Text.m_isOrthographic = false
protected
bool TMPro.TMP_Text.m_isOverlay = false
protected
bool TMPro.TMP_Text.m_isParsingText
protected
bool TMPro.TMP_Text.m_isPreferredHeightDirty
protected
bool TMPro.TMP_Text.m_isPreferredWidthDirty
protected
bool TMPro.TMP_Text.m_isRichText = true
protected
bool TMPro.TMP_Text.m_isRightToLeft = false
protected
bool TMPro.TMP_Text.m_isSDFShader
protected
bool TMPro.TMP_Text.m_isTextTruncated
protected
bool TMPro.TMP_Text.m_isUsingBold = false
protected
bool TMPro.TMP_Text.m_isUsingLegacyAnimationComponent
protected
bool TMPro.TMP_Text.m_isVolumetricText
protected
int TMPro.TMP_Text.m_lastCharacterOfLine
protected
int TMPro.TMP_Text.m_lastVisibleCharacterOfLine
protected
bool TMPro.TMP_Text.m_layoutAlreadyDirty
protected
LayoutElement TMPro.TMP_Text.m_LayoutElement
protected
int TMPro.TMP_Text.m_layoutPriority = 0
protected
float TMPro.TMP_Text.m_lineHeight = TMP_Math.FLOAT_UNSET
protected
TextAlignmentOptions TMPro.TMP_Text.m_lineJustification
protected
TMP_XmlTagStack<TextAlignmentOptions> TMPro.TMP_Text.m_lineJustificationStack = new TMP_XmlTagStack<TextAlignmentOptions>(new TextAlignmentOptions[16])
protected
int TMPro.TMP_Text.m_lineNumber
protected
float TMPro.TMP_Text.m_lineOffset
protected
float TMPro.TMP_Text.m_lineSpacing = 0
protected
float TMPro.TMP_Text.m_lineSpacingDelta = 0
protected
float TMPro.TMP_Text.m_lineSpacingMax = 0
protected
int TMPro.TMP_Text.m_lineVisibleCharacterCount
protected
TMP_Text TMPro.TMP_Text.m_linkedTextComponent
protected
Vector4 TMPro.TMP_Text.m_margin = new Vector4(0, 0, 0, 0)
protected
float TMPro.TMP_Text.m_marginHeight
protected
float TMPro.TMP_Text.m_marginLeft
protected
float TMPro.TMP_Text.m_marginRight
protected
float TMPro.TMP_Text.m_marginWidth
protected
Dictionary<int, int> TMPro.TMP_Text.m_materialReferenceIndexLookup = new Dictionary<int, int>()
protected
MaterialReference [] TMPro.TMP_Text.m_materialReferences = new MaterialReference[32]
protected
TMP_XmlTagStack<MaterialReference> TMPro.TMP_Text.m_materialReferenceStack = new TMP_XmlTagStack<MaterialReference>(new MaterialReference[16])
protected
float TMPro.TMP_Text.m_maxAscender
protected
float TMPro.TMP_Text.m_maxCapHeight
protected
float TMPro.TMP_Text.m_maxDescender
protected
float TMPro.TMP_Text.m_maxFontSize
protected
float TMPro.TMP_Text.m_maxHeight
protected
float TMPro.TMP_Text.m_maxLineAscender
protected
float TMPro.TMP_Text.m_maxLineDescender
protected
int TMPro.TMP_Text.m_maxVisibleCharacters = 99999
protected
int TMPro.TMP_Text.m_maxVisibleLines = 99999
protected
int TMPro.TMP_Text.m_maxVisibleWords = 99999
protected
float TMPro.TMP_Text.m_maxWidth
protected
Mesh TMPro.TMP_Text.m_mesh
protected
Extents TMPro.TMP_Text.m_meshExtents
protected
float TMPro.TMP_Text.m_minFontSize
protected
float TMPro.TMP_Text.m_minHeight
protected
float TMPro.TMP_Text.m_minWidth
protected
float TMPro.TMP_Text.m_monoSpacing = 0
protected
Color32 TMPro.TMP_Text.m_outlineColor = Color.black
protected
float TMPro.TMP_Text.m_outlineWidth = 0.0f
protected
TextOverflowModes TMPro.TMP_Text.m_overflowMode = TextOverflowModes.Overflow
protected
bool TMPro.TMP_Text.m_overrideHtmlColors = false
protected
float TMPro.TMP_Text.m_padding = 0
protected
int TMPro.TMP_Text.m_pageNumber
protected
int TMPro.TMP_Text.m_pageToDisplay = 1
protected
float TMPro.TMP_Text.m_paragraphSpacing = 0
protected
bool TMPro.TMP_Text.m_parseCtrlCharacters = true
protected
float TMPro.TMP_Text.m_preferredHeight
protected
float TMPro.TMP_Text.m_preferredWidth
protected
RectTransform TMPro.TMP_Text.m_rectTransform
protected
float TMPro.TMP_Text.m_renderedHeight
protected
float TMPro.TMP_Text.m_renderedWidth
protected
TextRenderFlags TMPro.TMP_Text.m_renderMode = TextRenderFlags.Render
protected
WordWrapState TMPro.TMP_Text.m_SavedLineState = new WordWrapState()
protected
WordWrapState TMPro.TMP_Text.m_SavedWordWrapState = new WordWrapState()
protected
Material TMPro.TMP_Text.m_sharedMaterial
protected
TMP_XmlTagStack<float> TMPro.TMP_Text.m_sizeStack = new TMP_XmlTagStack<float>(new float[16])
protected
float TMPro.TMP_Text.m_spacing = 0
protected
int TMPro.TMP_Text.m_spriteAnimationID
protected
TMP_SpriteAnimator TMPro.TMP_Text.m_spriteAnimator
protected
TMP_SpriteAsset TMPro.TMP_Text.m_spriteAsset
protected
Color32 TMPro.TMP_Text.m_spriteColor
protected
int TMPro.TMP_Text.m_spriteCount = 0
protected
int TMPro.TMP_Text.m_spriteIndex
protected
float TMPro.TMP_Text.m_startOfLineAscender
protected
Color32 TMPro.TMP_Text.m_strikethroughColor = s_colorWhite
protected
TMP_XmlTagStack<Color32> TMPro.TMP_Text.m_strikethroughColorStack = new TMP_XmlTagStack<Color32>(new Color32[16])
protected
FontStyles TMPro.TMP_Text.m_style = FontStyles.Normal
protected
TMP_XmlTagStack<int> TMPro.TMP_Text.m_styleStack = new TMP_XmlTagStack<int>(new int[16])
protected
float TMPro.TMP_Text.m_tabSpacing = 0
protected
string TMPro.TMP_Text.m_text
protected
TextAlignmentOptions TMPro.TMP_Text.m_textAlignment = TextAlignmentOptions.TopLeft
protected
Vector3 [] TMPro.TMP_Text.m_textContainerLocalCorners = new Vector3[4]
protected
TMP_TextElementType TMPro.TMP_Text.m_textElementType
protected
TMP_TextInfo TMPro.TMP_Text.m_textInfo
protected
bool TMPro.TMP_Text.m_tintAllSprites
protected
bool TMPro.TMP_Text.m_tintSprite
protected
int TMPro.TMP_Text.m_totalCharacterCount
protected
Transform TMPro.TMP_Text.m_transform
protected
Color32 TMPro.TMP_Text.m_underlineColor = s_colorWhite
protected
TMP_XmlTagStack<Color32> TMPro.TMP_Text.m_underlineColorStack = new TMP_XmlTagStack<Color32>(new Color32[16])
protected
bool TMPro.TMP_Text.m_useMaxVisibleDescender = true
protected
float TMPro.TMP_Text.m_uvLineOffset = 0.0f
protected
TextureMappingOptions TMPro.TMP_Text.m_verticalMapping = TextureMappingOptions.Character
protected
bool TMPro.TMP_Text.m_verticesAlreadyDirty
protected
float TMPro.TMP_Text.m_width = -1
protected
float TMPro.TMP_Text.m_wordSpacing = 0
protected
float TMPro.TMP_Text.m_wordWrappingRatios = 0.4f
protected
float TMPro.TMP_Text.m_xAdvance
protected
XML_TagAttribute [] TMPro.TMP_Text.m_xmlAttribute = new XML_TagAttribute[8]
protected
string TMPro.TMP_Text.old_text
protected
Color32 TMPro.TMP_Text.s_colorWhite = new Color32(255, 255, 255, 255)
staticprotected
float TMPro.TMP_Text.tag_Indent = 0
protected
float TMPro.TMP_Text.tag_LineIndent = 0
protected
bool TMPro.TMP_Text.tag_NoParsing
protected

Property Documentation

TextAlignmentOptions TMPro.TMP_Text.alignment
getset

Text alignment options

float TMPro.TMP_Text.alpha
getset

Sets the vertex color alpha value.

virtual bool TMPro.TMP_Text.autoSizeTextContainer
getset

Enables control over setting the size of the text container to match the text object.

Bounds TMPro.TMP_Text.bounds
get

Returns the bounds of the mesh of the text object in world space.

float TMPro.TMP_Text.characterSpacing
getset

Use the extents of the text geometry for alignment instead of font metrics.

The amount of additional spacing between characters.

float TMPro.TMP_Text.characterWidthAdjustment
getset

Percentage the width of characters can be adjusted before text auto-sizing begins to reduce the point size.

override Color TMPro.TMP_Text.color
getset

This is the default vertex color assigned to each vertices. Color tags will override vertex colors unless the overrideColorTags is set.

VertexGradient TMPro.TMP_Text.colorGradient
getset

Sets the vertex colors for each of the 4 vertices of the character quads.

The color gradient.

TMP_ColorGradient TMPro.TMP_Text.colorGradientPreset
getset

Set the vertex colors of the 4 vertices of each character quads.

bool TMPro.TMP_Text.enableAutoSizing
getset

Enable text auto-sizing

bool TMPro.TMP_Text.enableCulling
getset

Sets the culling on the shaders. Note changing this value will result in an instance of the material.

bool TMPro.TMP_Text.enableKerning
getset

Determines if kerning is enabled or disabled.

bool TMPro.TMP_Text.enableVertexGradient
getset

Determines if Vertex Color Gradient should be used

true if enable vertex gradient; otherwise, false.

bool TMPro.TMP_Text.enableWordWrapping
getset

Controls whether or not word wrapping is applied. When disabled, the text will be displayed on a single line.

bool TMPro.TMP_Text.extraPadding
getset

Adds extra padding around each character. This may be necessary when the displayed text is very small to prevent clipping.

Color32 TMPro.TMP_Text.faceColor
getset

Sets the color of the _FaceColor property of the assigned material. Changing face color will result in an instance of the material.

int TMPro.TMP_Text.firstOverflowCharacterIndex
get

The first character which exceeds the vertical bounds of its text container.

int TMPro.TMP_Text.firstVisibleCharacter
getset

The first character which should be made visible in conjunction with the Text Overflow Linked mode.

float TMPro.TMP_Text.flexibleHeight
get

float TMPro.TMP_Text.flexibleWidth
get

TMP_FontAsset TMPro.TMP_Text.font
getset

The Font Asset to be assigned to this text object.

Material TMPro.TMP_Text.fontMaterial
getset

The material to be assigned to this text object. An instance of the material will be assigned to the object's renderer.

virtual Material [] TMPro.TMP_Text.fontMaterials
getset

The materials to be assigned to this text object. An instance of the materials will be assigned.

float TMPro.TMP_Text.fontScale
get

The scale of the current text.

virtual Material TMPro.TMP_Text.fontSharedMaterial
getset

The material to be assigned to this text object.

virtual Material [] TMPro.TMP_Text.fontSharedMaterials
getset

An array containing the materials used by the text object.

float TMPro.TMP_Text.fontSize
getset

The point size of the font.

float TMPro.TMP_Text.fontSizeMax
getset

Maximum point size of the font when text auto-sizing is enabled.

float TMPro.TMP_Text.fontSizeMin
getset

Minimum point size of the font when text auto-sizing is enabled.

FontStyles TMPro.TMP_Text.fontStyle
getset

The style of the text

int TMPro.TMP_Text.fontWeight
getset

Control the weight of the font if an alternative font asset is assigned for the given weight in the font asset editor.

VertexSortingOrder TMPro.TMP_Text.geometrySortingOrder
getset

Determines the sorting order of the geometry of the text object.

bool TMPro.TMP_Text.havePropertiesChanged
getset

Property tracking if any of the text properties have changed. Flag is set before the text is regenerated.

TextureMappingOptions TMPro.TMP_Text.horizontalMapping
getset

Controls how the face and outline textures will be applied to the text object.

bool TMPro.TMP_Text.ignoreRectMaskCulling
getset

Controls whether or not the text object will be culled when using a 2D Rect Mask.

bool TMPro.TMP_Text.ignoreVisibility
getset

Forces objects that are not visible to get refreshed.

bool TMPro.TMP_Text.isLinkedTextComponent
getset

Indicates whether this text component is linked to another.

bool TMPro.TMP_Text.isOrthographic
getset

Sets Perspective Correction to Zero for Orthographic Camera mode & 0.875f for Perspective Camera mode.

bool TMPro.TMP_Text.isOverlay
getset

Sets the RenderQueue along with Ztest to force the text to be drawn last and on top of scene elements.

bool TMPro.TMP_Text.isRightToLeftText
getset

bool TMPro.TMP_Text.isTextOverflowing
get

Indicates if the text exceeds the vertical bounds of its text container.

bool TMPro.TMP_Text.isTextTruncated
get

Property indicating whether the text is Truncated or using Ellipsis.

bool TMPro.TMP_Text.isUsingBold
get

Property used in conjunction with padding calculation for the geometry.

bool TMPro.TMP_Text.isUsingLegacyAnimationComponent
getset

Property to handle legacy animation component.

bool TMPro.TMP_Text.isVolumetricText
getset

Determines if the geometry of the characters will be quads or volumetric (cubes).

LayoutElement TMPro.TMP_Text.layoutElement
getprotected

int TMPro.TMP_Text.layoutPriority
get

float TMPro.TMP_Text.lineSpacing
getset

The amount of additional spacing to add between each lines of text.

float TMPro.TMP_Text.lineSpacingAdjustment
getset

The amount of potential line spacing adjustment before text auto sizing kicks in.

TMP_Text TMPro.TMP_Text.linkedTextComponent
getset

The linked text component used for flowing the text from one text component to another.

float TMPro.TMP_Text.mappingUvLineOffset
getset

Controls the UV Offset for the various texture mapping mode on the text object.

Controls the horizontal offset of the UV of the texture mapping mode for each line of the text object.

virtual Vector4 TMPro.TMP_Text.margin
getset

The margins of the text object.

float TMPro.TMP_Text.maxHeight
get

int TMPro.TMP_Text.maxVisibleCharacters
getset

Allows to control how many characters are visible from the input.

int TMPro.TMP_Text.maxVisibleLines
getset

Allows control over how many lines of text are displayed.

int TMPro.TMP_Text.maxVisibleWords
getset

Allows to control how many words are visible from the input.

float TMPro.TMP_Text.maxWidth
get

virtual Mesh TMPro.TMP_Text.mesh
get

The mesh used by the font asset and material assigned to the text object.

float TMPro.TMP_Text.minHeight
get

float TMPro.TMP_Text.minWidth
get

Color32 TMPro.TMP_Text.outlineColor
getset

Sets the color of the _OutlineColor property of the assigned material. Changing outline color will result in an instance of the material.

float TMPro.TMP_Text.outlineWidth
getset

Sets the thickness of the outline of the font. Setting this value will result in an instance of the material.

TextOverflowModes TMPro.TMP_Text.overflowMode
getset

Controls the Text Overflow Mode

bool TMPro.TMP_Text.overrideColorTags
getset

This overrides the color tags forcing the vertex colors to be the default font color.

int TMPro.TMP_Text.pageToDisplay
getset

Controls which page of text is shown

float TMPro.TMP_Text.paragraphSpacing
getset

The amount of additional spacing to add between each lines of text.

bool TMPro.TMP_Text.parseCtrlCharacters
getset

Enables or Disables parsing of CTRL characters in input text.

float TMPro.TMP_Text.pixelsPerUnit
get

virtual float TMPro.TMP_Text.preferredHeight
get

Computed preferred height of the text object.

virtual float TMPro.TMP_Text.preferredWidth
get

Computed preferred width of the text object.

new RectTransform TMPro.TMP_Text.rectTransform
get

Returns are reference to the RectTransform

virtual float TMPro.TMP_Text.renderedHeight
get

Compute the rendered height of the text object.

virtual float TMPro.TMP_Text.renderedWidth
get

Compute the rendered width of the text object.

TextRenderFlags TMPro.TMP_Text.renderMode
getset

Determines if the Mesh will be rendered.

bool TMPro.TMP_Text.richText
getset

Enables or Disables Rich Text Tags

TMP_SpriteAnimator TMPro.TMP_Text.spriteAnimator
getprotected

Component used to control wrapping of text following some arbitrary shape.

Component used to control and animate sprites in the text object.

TMP_SpriteAsset TMPro.TMP_Text.spriteAsset
getset

Default Sprite Asset used by the text object.

string TMPro.TMP_Text.text
getset

A string containing the text to be displayed.

Bounds TMPro.TMP_Text.textBounds
get

Returns the bounds of the text of the text object.

TMP_TextInfo TMPro.TMP_Text.textInfo
get

Returns data about the text object which includes information about each character, word, line, link, etc.

bool TMPro.TMP_Text.tintAllSprites
getset

Determines whether or not the sprite color is multiplies by the vertex color of the text.

new Transform TMPro.TMP_Text.transform
get

Returns are reference to the Transform

bool TMPro.TMP_Text.useMaxVisibleDescender
getset

Determines if the text's vertical alignment will be adjusted based on visible descender of the text.

TextureMappingOptions TMPro.TMP_Text.verticalMapping
getset

Controls how the face and outline textures will be applied to the text object.

float TMPro.TMP_Text.wordSpacing
getset

The amount of additional spacing between words.

float TMPro.TMP_Text.wordWrappingRatios
getset

Controls the blending between using character and word spacing to fill-in the space for justified text.


The documentation for this class was generated from the following file: