Class TMP_Text
Base class which contains common properties and functions shared between the TextMeshPro and TextMeshProUGUI component.
Namespace: TMPro
Syntax
public class TMP_Text : MaskableGraphic
Fields
checkPaddingRequired
Declaration
protected bool checkPaddingRequired
Field Value
k_LargeNegativeFloat
Declaration
protected static float k_LargeNegativeFloat
Field Value
k_LargeNegativeInt
Declaration
protected static int k_LargeNegativeInt
Field Value
k_LargeNegativeVector2
Declaration
protected static Vector2 k_LargeNegativeVector2
Field Value
k_LargePositiveFloat
Declaration
protected static float k_LargePositiveFloat
Field Value
k_LargePositiveInt
Declaration
protected static int k_LargePositiveInt
Field Value
k_LargePositiveVector2
Declaration
protected static Vector2 k_LargePositiveVector2
Field Value
m_actionStack
Declaration
protected TMP_XmlTagStack<int> m_actionStack
Field Value
m_attributeParameterValues
Declaration
protected float[] m_attributeParameterValues
Field Value
m_autoSizeTextContainer
Declaration
protected bool m_autoSizeTextContainer
Field Value
m_baselineOffset
Declaration
protected float m_baselineOffset
Field Value
m_baselineOffsetStack
Declaration
protected TMP_XmlTagStack<float> m_baselineOffsetStack
Field Value
m_cached_Ellipsis_GlyphInfo
Declaration
protected TMP_Glyph m_cached_Ellipsis_GlyphInfo
Field Value
m_cached_TextElement
Declaration
protected TMP_TextElement m_cached_TextElement
Field Value
m_cached_Underline_GlyphInfo
Declaration
protected TMP_Glyph m_cached_Underline_GlyphInfo
Field Value
m_char_buffer
Declaration
protected int[] m_char_buffer
Field Value
m_characterCount
Declaration
protected int m_characterCount
Field Value
m_characterSpacing
Declaration
protected float m_characterSpacing
Field Value
m_charWidthAdjDelta
Declaration
protected float m_charWidthAdjDelta
Field Value
m_charWidthMaxAdj
Declaration
protected float m_charWidthMaxAdj
Field Value
m_colorGradientPreset
Declaration
protected TMP_ColorGradient m_colorGradientPreset
Field Value
m_colorGradientStack
Declaration
protected TMP_XmlTagStack<TMP_ColorGradient> m_colorGradientStack
Field Value
m_colorStack
Declaration
protected TMP_XmlTagStack<Color32> m_colorStack
Field Value
m_cSpacing
Declaration
protected float m_cSpacing
Field Value
m_currentFontAsset
Declaration
protected TMP_FontAsset m_currentFontAsset
Field Value
m_currentFontSize
Declaration
protected float m_currentFontSize
Field Value
m_currentMaterial
Declaration
protected Material m_currentMaterial
Field Value
Type |
Description |
Material |
|
m_currentMaterialIndex
Declaration
protected int m_currentMaterialIndex
Field Value
m_currentSpriteAsset
Declaration
protected TMP_SpriteAsset m_currentSpriteAsset
Field Value
m_defaultSpriteAsset
Declaration
protected TMP_SpriteAsset m_defaultSpriteAsset
Field Value
m_enableAutoSizing
Declaration
protected bool m_enableAutoSizing
Field Value
Declaration
protected bool m_enableExtraPadding
Field Value
m_enableKerning
Declaration
protected bool m_enableKerning
Field Value
m_enableVertexGradient
Declaration
protected bool m_enableVertexGradient
Field Value
m_enableWordWrapping
Declaration
protected bool m_enableWordWrapping
Field Value
m_faceColor
Declaration
protected Color32 m_faceColor
Field Value
m_firstCharacterOfLine
Declaration
protected int m_firstCharacterOfLine
Field Value
m_firstOverflowCharacterIndex
Declaration
protected int m_firstOverflowCharacterIndex
Field Value
m_firstVisibleCharacter
Declaration
protected int m_firstVisibleCharacter
Field Value
m_firstVisibleCharacterOfLine
Declaration
protected int m_firstVisibleCharacterOfLine
Field Value
m_flexibleHeight
Declaration
protected float m_flexibleHeight
Field Value
m_flexibleWidth
Declaration
protected float m_flexibleWidth
Field Value
m_fontAsset
Declaration
protected TMP_FontAsset m_fontAsset
Field Value
m_fontColor
Declaration
protected Color m_fontColor
Field Value
m_fontColor32
Declaration
protected Color32 m_fontColor32
Field Value
m_fontColorGradient
Declaration
protected VertexGradient m_fontColorGradient
Field Value
m_fontColorGradientPreset
Declaration
protected TMP_ColorGradient m_fontColorGradientPreset
Field Value
m_fontMaterial
Declaration
protected Material m_fontMaterial
Field Value
Type |
Description |
Material |
|
m_fontMaterials
Declaration
protected Material[] m_fontMaterials
Field Value
Type |
Description |
Material[] |
|
m_fontScale
Declaration
protected float m_fontScale
Field Value
m_fontScaleMultiplier
Declaration
protected float m_fontScaleMultiplier
Field Value
m_fontSharedMaterials
Declaration
protected Material[] m_fontSharedMaterials
Field Value
Type |
Description |
Material[] |
|
m_fontSize
Declaration
protected float m_fontSize
Field Value
m_fontSizeBase
Declaration
protected float m_fontSizeBase
Field Value
m_fontSizeMax
Declaration
protected float m_fontSizeMax
Field Value
m_fontSizeMin
Declaration
protected float m_fontSizeMin
Field Value
m_fontStyle
Declaration
protected FontStyles m_fontStyle
Field Value
m_fontStyleStack
Declaration
protected TMP_BasicXmlTagStack m_fontStyleStack
Field Value
m_fontWeight
Declaration
protected int m_fontWeight
Field Value
m_fontWeightInternal
Declaration
protected int m_fontWeightInternal
Field Value
m_fontWeightStack
Declaration
protected TMP_XmlTagStack<int> m_fontWeightStack
Field Value
m_FXMatrix
Declaration
protected Matrix4x4 m_FXMatrix
Field Value
Type |
Description |
Matrix4x4 |
|
m_geometrySortingOrder
Declaration
protected VertexSortingOrder m_geometrySortingOrder
Field Value
m_havePropertiesChanged
Declaration
protected bool m_havePropertiesChanged
Field Value
m_highlightColor
Declaration
protected Color32 m_highlightColor
Field Value
m_highlightColorStack
Declaration
protected TMP_XmlTagStack<Color32> m_highlightColorStack
Field Value
m_horizontalMapping
Declaration
protected TextureMappingOptions m_horizontalMapping
Field Value
m_htmlColor
Declaration
protected Color32 m_htmlColor
Field Value
m_htmlTag
Declaration
protected char[] m_htmlTag
Field Value
m_ignoreActiveState
Declaration
protected bool m_ignoreActiveState
Field Value
m_ignoreCulling
Declaration
protected bool m_ignoreCulling
Field Value
m_ignoreRectMaskCulling
Declaration
protected bool m_ignoreRectMaskCulling
Field Value
m_indentStack
Declaration
protected TMP_XmlTagStack<float> m_indentStack
Field Value
m_input_CharArray
Declaration
protected char[] m_input_CharArray
Field Value
m_inputSource
Declaration
protected TMP_Text.TextInputSources m_inputSource
Field Value
m_isAlignmentEnumConverted
Declaration
protected bool m_isAlignmentEnumConverted
Field Value
m_isAwake
Declaration
Field Value
m_isCalculateSizeRequired
Declaration
protected bool m_isCalculateSizeRequired
Field Value
m_isCalculatingPreferredValues
Declaration
protected bool m_isCalculatingPreferredValues
Field Value
m_isCharacterWrappingEnabled
Declaration
protected bool m_isCharacterWrappingEnabled
Field Value
m_isCullingEnabled
Declaration
protected bool m_isCullingEnabled
Field Value
m_isFXMatrixSet
Declaration
protected bool m_isFXMatrixSet
Field Value
m_isIgnoringAlignment
Declaration
protected bool m_isIgnoringAlignment
Field Value
m_isInputParsingRequired
Declaration
protected bool m_isInputParsingRequired
Field Value
m_isLayoutDirty
Declaration
protected bool m_isLayoutDirty
Field Value
m_isLinkedTextComponent
Declaration
protected bool m_isLinkedTextComponent
Field Value
m_isMaterialDirty
Declaration
protected bool m_isMaterialDirty
Field Value
m_isNewPage
Declaration
protected bool m_isNewPage
Field Value
m_isNonBreakingSpace
Declaration
protected bool m_isNonBreakingSpace
Field Value
m_isOrthographic
Declaration
protected bool m_isOrthographic
Field Value
m_isOverlay
Declaration
protected bool m_isOverlay
Field Value
m_isParsingText
Declaration
protected bool m_isParsingText
Field Value
m_isPreferredHeightDirty
Declaration
protected bool m_isPreferredHeightDirty
Field Value
m_isPreferredWidthDirty
Declaration
protected bool m_isPreferredWidthDirty
Field Value
m_isRichText
Declaration
protected bool m_isRichText
Field Value
m_isRightToLeft
Declaration
protected bool m_isRightToLeft
Field Value
m_isSDFShader
Declaration
protected bool m_isSDFShader
Field Value
m_isTextTruncated
Declaration
protected bool m_isTextTruncated
Field Value
m_isUsingBold
Declaration
protected bool m_isUsingBold
Field Value
m_isUsingLegacyAnimationComponent
Declaration
protected bool m_isUsingLegacyAnimationComponent
Field Value
m_isVolumetricText
Declaration
protected bool m_isVolumetricText
Field Value
m_isWaitingOnResourceLoad
Declaration
protected bool m_isWaitingOnResourceLoad
Field Value
m_lastCharacterOfLine
Declaration
protected int m_lastCharacterOfLine
Field Value
m_lastVisibleCharacterOfLine
Declaration
protected int m_lastVisibleCharacterOfLine
Field Value
m_layoutAlreadyDirty
Declaration
protected bool m_layoutAlreadyDirty
Field Value
m_LayoutElement
Declaration
protected LayoutElement m_LayoutElement
Field Value
Type |
Description |
LayoutElement |
|
m_layoutPriority
Declaration
protected int m_layoutPriority
Field Value
m_lineHeight
Declaration
protected float m_lineHeight
Field Value
m_lineJustification
Declaration
protected TextAlignmentOptions m_lineJustification
Field Value
m_lineJustificationStack
Declaration
protected TMP_XmlTagStack<TextAlignmentOptions> m_lineJustificationStack
Field Value
m_lineNumber
Declaration
protected int m_lineNumber
Field Value
m_lineOffset
Declaration
protected float m_lineOffset
Field Value
m_lineSpacing
Declaration
protected float m_lineSpacing
Field Value
m_lineSpacingDelta
Declaration
protected float m_lineSpacingDelta
Field Value
m_lineSpacingMax
Declaration
protected float m_lineSpacingMax
Field Value
m_lineVisibleCharacterCount
Declaration
protected int m_lineVisibleCharacterCount
Field Value
m_linkedTextComponent
Declaration
protected TMP_Text m_linkedTextComponent
Field Value
m_margin
Declaration
protected Vector4 m_margin
Field Value
m_marginHeight
Declaration
protected float m_marginHeight
Field Value
m_marginLeft
Declaration
protected float m_marginLeft
Field Value
m_marginRight
Declaration
protected float m_marginRight
Field Value
m_marginWidth
Declaration
protected float m_marginWidth
Field Value
m_materialReferenceIndexLookup
Declaration
protected Dictionary<int, int> m_materialReferenceIndexLookup
Field Value
m_materialReferences
Declaration
protected MaterialReference[] m_materialReferences
Field Value
m_materialReferenceStack
Declaration
protected TMP_XmlTagStack<MaterialReference> m_materialReferenceStack
Field Value
m_maxAscender
Declaration
protected float m_maxAscender
Field Value
m_maxCapHeight
Declaration
protected float m_maxCapHeight
Field Value
m_maxDescender
Declaration
protected float m_maxDescender
Field Value
m_maxFontSize
Declaration
protected float m_maxFontSize
Field Value
m_maxHeight
Declaration
protected float m_maxHeight
Field Value
m_maxLineAscender
Declaration
protected float m_maxLineAscender
Field Value
m_maxLineDescender
Declaration
protected float m_maxLineDescender
Field Value
m_maxVisibleCharacters
Declaration
protected int m_maxVisibleCharacters
Field Value
m_maxVisibleLines
Declaration
protected int m_maxVisibleLines
Field Value
m_maxVisibleWords
Declaration
protected int m_maxVisibleWords
Field Value
m_maxWidth
Declaration
protected float m_maxWidth
Field Value
m_mesh
Declaration
Field Value
m_meshExtents
Declaration
protected Extents m_meshExtents
Field Value
m_minFontSize
Declaration
protected float m_minFontSize
Field Value
m_minHeight
Declaration
protected float m_minHeight
Field Value
m_minWidth
Declaration
protected float m_minWidth
Field Value
m_monoSpacing
Declaration
protected float m_monoSpacing
Field Value
m_outlineColor
Declaration
protected Color32 m_outlineColor
Field Value
m_outlineWidth
Declaration
protected float m_outlineWidth
Field Value
m_overflowMode
Declaration
protected TextOverflowModes m_overflowMode
Field Value
m_overrideHtmlColors
Declaration
protected bool m_overrideHtmlColors
Field Value
m_padding
Declaration
protected float m_padding
Field Value
m_pageNumber
Declaration
protected int m_pageNumber
Field Value
m_pageToDisplay
Declaration
protected int m_pageToDisplay
Field Value
m_paragraphSpacing
Declaration
protected float m_paragraphSpacing
Field Value
m_parseCtrlCharacters
Declaration
protected bool m_parseCtrlCharacters
Field Value
m_preferredHeight
Declaration
protected float m_preferredHeight
Field Value
m_preferredWidth
Declaration
protected float m_preferredWidth
Field Value
m_rectTransform
Declaration
protected RectTransform m_rectTransform
Field Value
Type |
Description |
RectTransform |
|
m_renderedHeight
Declaration
protected float m_renderedHeight
Field Value
m_renderedWidth
Declaration
protected float m_renderedWidth
Field Value
m_renderMode
Declaration
protected TextRenderFlags m_renderMode
Field Value
m_SavedLineState
Declaration
protected WordWrapState m_SavedLineState
Field Value
m_SavedWordWrapState
Declaration
protected WordWrapState m_SavedWordWrapState
Field Value
m_sharedMaterial
Declaration
protected Material m_sharedMaterial
Field Value
Type |
Description |
Material |
|
m_sizeStack
Declaration
protected TMP_XmlTagStack<float> m_sizeStack
Field Value
m_spacing
Declaration
protected float m_spacing
Field Value
m_spriteAnimationID
Declaration
protected int m_spriteAnimationID
Field Value
m_spriteAnimator
Declaration
protected TMP_SpriteAnimator m_spriteAnimator
Field Value
m_spriteAsset
Declaration
protected TMP_SpriteAsset m_spriteAsset
Field Value
m_spriteColor
Declaration
protected Color32 m_spriteColor
Field Value
m_spriteCount
Declaration
protected int m_spriteCount
Field Value
m_spriteIndex
Declaration
protected int m_spriteIndex
Field Value
m_startOfLineAscender
Declaration
protected float m_startOfLineAscender
Field Value
m_strikethroughColor
Declaration
protected Color32 m_strikethroughColor
Field Value
m_strikethroughColorStack
Declaration
protected TMP_XmlTagStack<Color32> m_strikethroughColorStack
Field Value
m_style
Declaration
protected FontStyles m_style
Field Value
m_styleStack
Declaration
protected TMP_XmlTagStack<int> m_styleStack
Field Value
m_tabSpacing
Declaration
protected float m_tabSpacing
Field Value
m_text
Declaration
Field Value
m_textAlignment
Declaration
protected TextAlignmentOptions m_textAlignment
Field Value
m_textContainerLocalCorners
Declaration
protected Vector3[] m_textContainerLocalCorners
Field Value
Type |
Description |
Vector3[] |
|
m_textElementType
Declaration
protected TMP_TextElementType m_textElementType
Field Value
m_textInfo
Declaration
protected TMP_TextInfo m_textInfo
Field Value
m_tintAllSprites
Declaration
protected bool m_tintAllSprites
Field Value
m_tintSprite
Declaration
protected bool m_tintSprite
Field Value
m_totalCharacterCount
Declaration
protected int m_totalCharacterCount
Field Value
m_transform
Declaration
protected Transform m_transform
Field Value
Type |
Description |
Transform |
|
m_underlineColor
Declaration
protected Color32 m_underlineColor
Field Value
m_underlineColorStack
Declaration
protected TMP_XmlTagStack<Color32> m_underlineColorStack
Field Value
m_useMaxVisibleDescender
Declaration
protected bool m_useMaxVisibleDescender
Field Value
m_uvLineOffset
Declaration
protected float m_uvLineOffset
Field Value
m_verticalMapping
Declaration
protected TextureMappingOptions m_verticalMapping
Field Value
m_verticesAlreadyDirty
Declaration
protected bool m_verticesAlreadyDirty
Field Value
m_width
Declaration
Field Value
m_wordSpacing
Declaration
protected float m_wordSpacing
Field Value
m_wordWrappingRatios
Declaration
protected float m_wordWrappingRatios
Field Value
m_xAdvance
Declaration
protected float m_xAdvance
Field Value
m_xmlAttribute
Declaration
protected XML_TagAttribute[] m_xmlAttribute
Field Value
old_text
Declaration
protected string old_text
Field Value
s_colorWhite
Declaration
protected static Color32 s_colorWhite
Field Value
tag_Indent
Declaration
protected float tag_Indent
Field Value
tag_LineIndent
Declaration
protected float tag_LineIndent
Field Value
tag_NoParsing
Declaration
protected bool tag_NoParsing
Field Value
Properties
alignment
Declaration
public TextAlignmentOptions alignment { get; set; }
Property Value
alpha
Sets the vertex color alpha value.
Declaration
public float alpha { get; set; }
Property Value
autoSizeTextContainer
Enables control over setting the size of the text container to match the text object.
Declaration
public virtual bool autoSizeTextContainer { get; set; }
Property Value
bounds
Returns the bounds of the mesh of the text object in world space.
Declaration
public Bounds bounds { get; }
Property Value
characterSpacing
The amount of additional spacing between characters.
Declaration
public float characterSpacing { get; set; }
Property Value
characterWidthAdjustment
Percentage the width of characters can be adjusted before text auto-sizing begins to reduce the point size.
Declaration
public float characterWidthAdjustment { get; set; }
Property Value
color
This is the default vertex color assigned to each vertices. Color tags will override vertex colors unless the overrideColorTags is set.
Declaration
public override Color color { get; set; }
Property Value
colorGradient
Sets the vertex colors for each of the 4 vertices of the character quads.
Declaration
public VertexGradient colorGradient { get; set; }
Property Value
colorGradientPreset
Set the vertex colors of the 4 vertices of each character quads.
Declaration
public TMP_ColorGradient colorGradientPreset { get; set; }
Property Value
enableAutoSizing
Declaration
public bool enableAutoSizing { get; set; }
Property Value
enableCulling
Sets the culling on the shaders. Note changing this value will result in an instance of the material.
Declaration
public bool enableCulling { get; set; }
Property Value
enableKerning
Determines if kerning is enabled or disabled.
Declaration
public bool enableKerning { get; set; }
Property Value
enableVertexGradient
Determines if Vertex Color Gradient should be used
Declaration
public bool enableVertexGradient { get; set; }
Property Value
Type |
Description |
Boolean |
true if enable vertex gradient; otherwise, false .
|
enableWordWrapping
Controls whether or not word wrapping is applied. When disabled, the text will be displayed on a single line.
Declaration
public bool enableWordWrapping { get; set; }
Property Value
Adds extra padding around each character. This may be necessary when the displayed text is very small to prevent clipping.
Declaration
public bool extraPadding { get; set; }
Property Value
faceColor
Sets the color of the _FaceColor property of the assigned material. Changing face color will result in an instance of the material.
Declaration
public Color32 faceColor { get; set; }
Property Value
firstOverflowCharacterIndex
The first character which exceeds the vertical bounds of its text container.
Declaration
public int firstOverflowCharacterIndex { get; }
Property Value
firstVisibleCharacter
The first character which should be made visible in conjunction with the Text Overflow Linked mode.
Declaration
public int firstVisibleCharacter { get; set; }
Property Value
flexibleHeight
Declaration
public float flexibleHeight { get; }
Property Value
flexibleWidth
Declaration
public float flexibleWidth { get; }
Property Value
font
The Font Asset to be assigned to this text object.
Declaration
public TMP_FontAsset font { get; set; }
Property Value
fontMaterial
The material to be assigned to this text object. An instance of the material will be assigned to the object's renderer.
Declaration
public Material fontMaterial { get; set; }
Property Value
Type |
Description |
Material |
|
fontMaterials
The materials to be assigned to this text object. An instance of the materials will be assigned.
Declaration
public virtual Material[] fontMaterials { get; set; }
Property Value
Type |
Description |
Material[] |
|
fontScale
The scale of the current text.
Declaration
public float fontScale { get; }
Property Value
fontSharedMaterial
The material to be assigned to this text object.
Declaration
public virtual Material fontSharedMaterial { get; set; }
Property Value
Type |
Description |
Material |
|
fontSharedMaterials
An array containing the materials used by the text object.
Declaration
public virtual Material[] fontSharedMaterials { get; set; }
Property Value
Type |
Description |
Material[] |
|
fontSize
The point size of the font.
Declaration
public float fontSize { get; set; }
Property Value
fontSizeMax
Maximum point size of the font when text auto-sizing is enabled.
Declaration
public float fontSizeMax { get; set; }
Property Value
fontSizeMin
Minimum point size of the font when text auto-sizing is enabled.
Declaration
public float fontSizeMin { get; set; }
Property Value
fontStyle
Declaration
public FontStyles fontStyle { get; set; }
Property Value
fontWeight
Control the weight of the font if an alternative font asset is assigned for the given weight in the font asset editor.
Declaration
public int fontWeight { get; set; }
Property Value
geometrySortingOrder
Determines the sorting order of the geometry of the text object.
Declaration
public VertexSortingOrder geometrySortingOrder { get; set; }
Property Value
havePropertiesChanged
Property tracking if any of the text properties have changed. Flag is set before the text is regenerated.
Declaration
public bool havePropertiesChanged { get; set; }
Property Value
horizontalMapping
Controls how the face and outline textures will be applied to the text object.
Declaration
public TextureMappingOptions horizontalMapping { get; set; }
Property Value
ignoreRectMaskCulling
Controls whether or not the text object will be culled when using a 2D Rect Mask.
Declaration
public bool ignoreRectMaskCulling { get; set; }
Property Value
ignoreVisibility
Forces objects that are not visible to get refreshed.
Declaration
public bool ignoreVisibility { get; set; }
Property Value
isLinkedTextComponent
Indicates whether this text component is linked to another.
Declaration
public bool isLinkedTextComponent { get; set; }
Property Value
isOrthographic
Declaration
public bool isOrthographic { get; set; }
Property Value
isOverlay
Sets the RenderQueue along with Ztest to force the text to be drawn last and on top of scene elements.
Declaration
public bool isOverlay { get; set; }
Property Value
isRightToLeftText
Declaration
public bool isRightToLeftText { get; set; }
Property Value
isTextOverflowing
Indicates if the text exceeds the vertical bounds of its text container.
Declaration
public bool isTextOverflowing { get; }
Property Value
isTextTruncated
Property indicating whether the text is Truncated or using Ellipsis.
Declaration
public bool isTextTruncated { get; }
Property Value
isUsingBold
Property used in conjunction with padding calculation for the geometry.
Declaration
public bool isUsingBold { get; }
Property Value
isUsingLegacyAnimationComponent
Property to handle legacy animation component.
Declaration
public bool isUsingLegacyAnimationComponent { get; set; }
Property Value
isVolumetricText
Determines if the geometry of the characters will be quads or volumetric (cubes).
Declaration
public bool isVolumetricText { get; set; }
Property Value
layoutElement
Declaration
protected LayoutElement layoutElement { get; }
Property Value
Type |
Description |
LayoutElement |
|
layoutPriority
Declaration
public int layoutPriority { get; }
Property Value
lineSpacing
The amount of additional spacing to add between each lines of text.
Declaration
public float lineSpacing { get; set; }
Property Value
lineSpacingAdjustment
The amount of potential line spacing adjustment before text auto sizing kicks in.
Declaration
public float lineSpacingAdjustment { get; set; }
Property Value
linkedTextComponent
The linked text component used for flowing the text from one text component to another.
Declaration
public TMP_Text linkedTextComponent { get; set; }
Property Value
mappingUvLineOffset
Controls the horizontal offset of the UV of the texture mapping mode for each line of the text object.
Declaration
public float mappingUvLineOffset { get; set; }
Property Value
margin
The margins of the text object.
Declaration
public virtual Vector4 margin { get; set; }
Property Value
maxHeight
Declaration
public float maxHeight { get; }
Property Value
maxVisibleCharacters
Allows to control how many characters are visible from the input.
Declaration
public int maxVisibleCharacters { get; set; }
Property Value
maxVisibleLines
Allows control over how many lines of text are displayed.
Declaration
public int maxVisibleLines { get; set; }
Property Value
maxVisibleWords
Allows to control how many words are visible from the input.
Declaration
public int maxVisibleWords { get; set; }
Property Value
maxWidth
Declaration
public float maxWidth { get; }
Property Value
mesh
The mesh used by the font asset and material assigned to the text object.
Declaration
public virtual Mesh mesh { get; }
Property Value
minHeight
Declaration
public float minHeight { get; }
Property Value
minWidth
Declaration
public float minWidth { get; }
Property Value
outlineColor
Sets the color of the _OutlineColor property of the assigned material. Changing outline color will result in an instance of the material.
Declaration
public Color32 outlineColor { get; set; }
Property Value
outlineWidth
Sets the thickness of the outline of the font. Setting this value will result in an instance of the material.
Declaration
public float outlineWidth { get; set; }
Property Value
overflowMode
Controls the Text Overflow Mode
Declaration
public TextOverflowModes overflowMode { get; set; }
Property Value
overrideColorTags
This overrides the color tags forcing the vertex colors to be the default font color.
Declaration
public bool overrideColorTags { get; set; }
Property Value
pageToDisplay
Controls which page of text is shown
Declaration
public int pageToDisplay { get; set; }
Property Value
paragraphSpacing
The amount of additional spacing to add between each lines of text.
Declaration
public float paragraphSpacing { get; set; }
Property Value
parseCtrlCharacters
Enables or Disables parsing of CTRL characters in input text.
Declaration
public bool parseCtrlCharacters { get; set; }
Property Value
pixelsPerUnit
Declaration
public float pixelsPerUnit { get; }
Property Value
preferredHeight
Computed preferred height of the text object.
Declaration
public virtual float preferredHeight { get; }
Property Value
preferredWidth
Computed preferred width of the text object.
Declaration
public virtual float preferredWidth { get; }
Property Value
rectTransform
Returns are reference to the RectTransform
Declaration
public RectTransform rectTransform { get; }
Property Value
Type |
Description |
RectTransform |
|
renderedHeight
Compute the rendered height of the text object.
Declaration
public virtual float renderedHeight { get; }
Property Value
renderedWidth
Compute the rendered width of the text object.
Declaration
public virtual float renderedWidth { get; }
Property Value
renderMode
Determines if the Mesh will be rendered.
Declaration
public TextRenderFlags renderMode { get; set; }
Property Value
richText
Enables or Disables Rich Text Tags
Declaration
public bool richText { get; set; }
Property Value
spriteAnimator
Component used to control and animate sprites in the text object.
Declaration
protected TMP_SpriteAnimator spriteAnimator { get; }
Property Value
spriteAsset
Default Sprite Asset used by the text object.
Declaration
public TMP_SpriteAsset spriteAsset { get; set; }
Property Value
text
A string containing the text to be displayed.
Declaration
public string text { get; set; }
Property Value
textBounds
Returns the bounds of the text of the text object.
Declaration
public Bounds textBounds { get; }
Property Value
textInfo
Returns data about the text object which includes information about each character, word, line, link, etc.
Declaration
public TMP_TextInfo textInfo { get; }
Property Value
tintAllSprites
Determines whether or not the sprite color is multiplies by the vertex color of the text.
Declaration
public bool tintAllSprites { get; set; }
Property Value
transform
Returns are reference to the Transform
Declaration
public Transform transform { get; }
Property Value
Type |
Description |
Transform |
|
useMaxVisibleDescender
Determines if the text's vertical alignment will be adjusted based on visible descender of the text.
Declaration
public bool useMaxVisibleDescender { get; set; }
Property Value
verticalMapping
Controls how the face and outline textures will be applied to the text object.
Declaration
public TextureMappingOptions verticalMapping { get; set; }
Property Value
wordSpacing
The amount of additional spacing between words.
Declaration
public float wordSpacing { get; set; }
Property Value
wordWrappingRatios
Controls the blending between using character and word spacing to fill-in the space for justified text.
Declaration
public float wordWrappingRatios { get; set; }
Property Value
Methods
AddFloatToCharArray(Single, ref Int32, Int32)
Function used in conjunction with SetText()
Declaration
protected void AddFloatToCharArray(float number, ref int index, int precision)
Parameters
AddIntToCharArray(Int32, ref Int32, Int32)
// Function used in conjunction with SetText()
Declaration
protected void AddIntToCharArray(int number, ref int index, int precision)
Parameters
AdjustLineOffset(Int32, Int32, Single)
Method to adjust line spacing as a result of using different fonts or font point size.
Declaration
protected virtual void AdjustLineOffset(int startIndex, int endIndex, float offset)
Parameters
CalculatePreferredValues(Single, Vector2, Boolean)
Method to calculate the preferred width and height of the text object.
Declaration
protected virtual Vector2 CalculatePreferredValues(float defaultFontSize, Vector2 marginSize, bool ignoreTextAutoSizing)
Parameters
Type |
Name |
Description |
Single |
defaultFontSize |
|
Vector2 |
marginSize |
|
Boolean |
ignoreTextAutoSizing |
|
Returns
ClearMesh()
Function to clear the geometry of the Primary and Sub Text objects.
Declaration
public virtual void ClearMesh()
ClearMesh(Boolean)
Function to clear the geometry of the Primary and Sub Text objects.
Declaration
public virtual void ClearMesh(bool uploadGeometry)
Parameters
Type |
Name |
Description |
Boolean |
uploadGeometry |
|
ClearSubMeshObjects()
Destroy Sub Mesh Objects.
Declaration
protected virtual void ClearSubMeshObjects()
ComputeMarginSize()
Function to force an update of the margin size.
Declaration
protected virtual void ComputeMarginSize()
ConvertToFloat(Char[], Int32, Int32)
Extracts a float value from char[] assuming we know the position of the start, end and decimal point.
Declaration
protected float ConvertToFloat(char[] chars, int startIndex, int length)
Parameters
Returns
ConvertToFloat(Char[], Int32, Int32, out Int32)
Extracts a float value from char[] given a start index and length.
Declaration
protected float ConvertToFloat(char[] chars, int startIndex, int length, out int lastIndex)
Parameters
Returns
CreateMaterialInstance(Material)
Function used to create an instance of the material
Declaration
protected virtual Material CreateMaterialInstance(Material source)
Parameters
Type |
Name |
Description |
Material |
source |
|
Returns
Type |
Description |
Material |
|
CrossFadeAlpha(Single, Single, Boolean)
Tweens the alpha of the CanvasRenderer color associated with this Graphic.
Declaration
public override void CrossFadeAlpha(float alpha, float duration, bool ignoreTimeScale)
Parameters
Type |
Name |
Description |
Single |
alpha |
Target alpha.
|
Single |
duration |
Duration of the tween in seconds.
|
Boolean |
ignoreTimeScale |
Should ignore Time.scale?
|
CrossFadeColor(Color, Single, Boolean, Boolean)
Tweens the CanvasRenderer color associated with this Graphic.
Declaration
public override void CrossFadeColor(Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha)
Parameters
Type |
Name |
Description |
Color |
targetColor |
Target color.
|
Single |
duration |
Tween duration.
|
Boolean |
ignoreTimeScale |
Should ignore Time.scale?
|
Boolean |
useAlpha |
Should also Tween the alpha channel?
|
DrawTextHighlight(Vector3, Vector3, ref Int32, Color32)
Declaration
protected virtual void DrawTextHighlight(Vector3 start, Vector3 end, ref int index, Color32 highlightColor)
Parameters
Type |
Name |
Description |
Vector3 |
start |
|
Vector3 |
end |
|
Int32 |
index |
|
Color32 |
highlightColor |
|
DrawUnderlineMesh(Vector3, Vector3, ref Int32, Single, Single, Single, Single, Color32)
Method to add the underline geometry.
Declaration
protected virtual void DrawUnderlineMesh(Vector3 start, Vector3 end, ref int index, float startScale, float endScale, float maxScale, float sdfScale, Color32 underlineColor)
Parameters
Type |
Name |
Description |
Vector3 |
start |
|
Vector3 |
end |
|
Int32 |
index |
|
Single |
startScale |
|
Single |
endScale |
|
Single |
maxScale |
|
Single |
sdfScale |
|
Color32 |
underlineColor |
|
FillCharacterVertexBuffers(Int32, Int32)
Store vertex attributes into the appropriate TMP_MeshInfo.
Declaration
protected virtual void FillCharacterVertexBuffers(int i, int index_X4)
Parameters
FillCharacterVertexBuffers(Int32, Int32, Boolean)
Declaration
protected virtual void FillCharacterVertexBuffers(int i, int index_X4, bool isVolumetric)
Parameters
FillSpriteVertexBuffers(Int32, Int32)
Fill Vertex Buffers for Sprites
Declaration
protected virtual void FillSpriteVertexBuffers(int i, int index_X4)
Parameters
ForceMeshUpdate()
Function to force the regeneration of the text object.
Declaration
public virtual void ForceMeshUpdate()
ForceMeshUpdate(Boolean)
Function to force the regeneration of the text object.
Declaration
public virtual void ForceMeshUpdate(bool ignoreActiveState)
Parameters
Type |
Name |
Description |
Boolean |
ignoreActiveState |
If set to true, the text object will be regenerated regardless of is active state.
|
GenerateTextMesh()
Method which parses the text input, does the layout of the text as well as generating the geometry.
Declaration
protected virtual void GenerateTextMesh()
GetCompoundBounds()
Method returning the compound bounds of the text object and child sub objects.
Declaration
protected virtual Bounds GetCompoundBounds()
Returns
GetFontAssetForWeight(Int32)
Declaration
protected TMP_FontAsset GetFontAssetForWeight(int fontWeight)
Parameters
Type |
Name |
Description |
Int32 |
fontWeight |
|
Returns
GetMaterial(Material)
Function called internally when a new material is assigned via the fontMaterial property.
Declaration
protected virtual Material GetMaterial(Material mat)
Parameters
Type |
Name |
Description |
Material |
mat |
|
Returns
Type |
Description |
Material |
|
GetMaterials(Material[])
Method returning instances of the materials used by the text object.
Declaration
protected virtual Material[] GetMaterials(Material[] mats)
Parameters
Type |
Name |
Description |
Material[] |
mats |
|
Returns
Type |
Description |
Material[] |
|
GetPaddingForMaterial()
Get the padding value for the currently assigned material
Declaration
protected virtual float GetPaddingForMaterial()
Returns
GetPaddingForMaterial(Material)
Get the padding value for the given material
Declaration
protected virtual float GetPaddingForMaterial(Material mat)
Parameters
Type |
Name |
Description |
Material |
mat |
|
Returns
GetParsedText()
Function which returns the text after it has been parsed and rich text tags removed.
Declaration
public virtual string GetParsedText()
Returns
GetPreferredHeight()
Method to calculate the preferred height of a text object.
Declaration
protected float GetPreferredHeight()
Returns
GetPreferredHeight(Vector2)
Method to calculate the preferred height of a text object.
Declaration
protected float GetPreferredHeight(Vector2 margin)
Parameters
Type |
Name |
Description |
Vector2 |
margin |
|
Returns
GetPreferredValues()
Function to Calculate the Preferred Width and Height of the text object.
Declaration
public Vector2 GetPreferredValues()
Returns
GetPreferredValues(Single, Single)
Function to Calculate the Preferred Width and Height of the text object given the provided width and height.
Declaration
public Vector2 GetPreferredValues(float width, float height)
Parameters
Returns
GetPreferredValues(String)
Function to Calculate the Preferred Width and Height of the text object given a certain string.
Declaration
public Vector2 GetPreferredValues(string text)
Parameters
Type |
Name |
Description |
String |
text |
|
Returns
GetPreferredValues(String, Single, Single)
Function to Calculate the Preferred Width and Height of the text object given a certain string and size of text container.
Declaration
public Vector2 GetPreferredValues(string text, float width, float height)
Parameters
Returns
GetPreferredWidth()
Method to calculate the preferred width of a text object.
Declaration
protected float GetPreferredWidth()
Returns
GetPreferredWidth(Vector2)
Method to calculate the preferred width of a text object.
Declaration
protected float GetPreferredWidth(Vector2 margin)
Parameters
Type |
Name |
Description |
Vector2 |
margin |
|
Returns
GetRenderedHeight()
Method returning the rendered height of the text object.
Declaration
protected float GetRenderedHeight()
Returns
GetRenderedHeight(Boolean)
Method returning the rendered height of the text object.
Declaration
protected float GetRenderedHeight(bool onlyVisibleCharacters)
Parameters
Type |
Name |
Description |
Boolean |
onlyVisibleCharacters |
|
Returns
GetRenderedValues()
Method returning the rendered width and height of the text object.
Declaration
public Vector2 GetRenderedValues()
Returns
GetRenderedValues(Boolean)
Declaration
public Vector2 GetRenderedValues(bool onlyVisibleCharacters)
Parameters
Type |
Name |
Description |
Boolean |
onlyVisibleCharacters |
Should returned value only factor in visible characters and exclude those greater than maxVisibleCharacters for instance.
|
Returns
GetRenderedWidth()
Method returning the rendered width of the text object.
Declaration
protected float GetRenderedWidth()
Returns
GetRenderedWidth(Boolean)
Method returning the rendered width of the text object.
Declaration
protected float GetRenderedWidth(bool onlyVisibleCharacters)
Parameters
Type |
Name |
Description |
Boolean |
onlyVisibleCharacters |
|
Returns
GetSharedMaterials()
Method which returns an array containing the materials used by the text object.
Declaration
protected virtual Material[] GetSharedMaterials()
Returns
Type |
Description |
Material[] |
|
GetSpecialCharacters(TMP_FontAsset)
Method used to find and cache references to the Underline and Ellipsis characters.
Declaration
protected void GetSpecialCharacters(TMP_FontAsset fontAsset)
Parameters
GetTextBounds()
Method which returns the bounds of the text object;
Declaration
protected Bounds GetTextBounds()
Returns
GetTextBounds(Boolean)
Method which returns the bounds of the text object;
Declaration
protected Bounds GetTextBounds(bool onlyVisibleCharacters)
Parameters
Type |
Name |
Description |
Boolean |
onlyVisibleCharacters |
|
Returns
GetTextContainerLocalCorners()
Method to return the local corners of the Text Container or RectTransform.
Declaration
protected virtual Vector3[] GetTextContainerLocalCorners()
Returns
Type |
Description |
Vector3[] |
|
GetTextInfo(String)
Function used to evaluate the length of a text string.
Declaration
public virtual TMP_TextInfo GetTextInfo(string text)
Parameters
Type |
Name |
Description |
String |
text |
|
Returns
GetUTF16(Int32)
Convert UTF-16 Hex to Char
Declaration
protected int GetUTF16(int i)
Parameters
Type |
Name |
Description |
Int32 |
i |
The index.
|
Returns
Type |
Description |
Int32 |
The Unicode hex.
|
GetUTF32(Int32)
Convert UTF-32 Hex to Char
Declaration
protected int GetUTF32(int i)
Parameters
Type |
Name |
Description |
Int32 |
i |
The index.
|
Returns
Type |
Description |
Int32 |
The Unicode hex.
|
HexCharsToColor(Char[], Int32)
Method to convert Hex color values to Color32
Declaration
protected Color32 HexCharsToColor(char[] hexChars, int tagCount)
Parameters
Type |
Name |
Description |
Char[] |
hexChars |
|
Int32 |
tagCount |
|
Returns
HexCharsToColor(Char[], Int32, Int32)
Method to convert Hex Color values to Color32
Declaration
protected Color32 HexCharsToColor(char[] hexChars, int startIndex, int length)
Parameters
Returns
HexToInt(Char)
Method to convert Hex to Int
Declaration
protected int HexToInt(char hex)
Parameters
Type |
Name |
Description |
Char |
hex |
|
Returns
InternalCrossFadeAlpha(Single, Single, Boolean)
Declaration
protected virtual void InternalCrossFadeAlpha(float alpha, float duration, bool ignoreTimeScale)
Parameters
InternalCrossFadeColor(Color, Single, Boolean, Boolean)
Declaration
protected virtual void InternalCrossFadeColor(Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha)
Parameters
LoadDefaultSettings()
Internal function used to load the default settings of text objects.
Declaration
protected void LoadDefaultSettings()
LoadFontAsset()
Method which derived classes need to override to load Font Assets.
Declaration
protected virtual void LoadFontAsset()
PackUV(Single, Single)
Declaration
protected float PackUV(float x, float y)
Parameters
Returns
PackUV(Single, Single, Single)
Function to pack scale information in the UV2 Channel.
Declaration
protected Vector2 PackUV(float x, float y, float scale)
Parameters
Returns
ParseInputText()
Method to parse the input text based on its source
Declaration
protected void ParseInputText()
ReplaceTagWithCharacter(Int32[], Int32, Int32, Char)
Replace a given number of characters (tag) in the array with a new character and shift subsequent characters in the array.
Declaration
protected void ReplaceTagWithCharacter(int[] chars, int insertionIndex, int tagLength, char c)
Parameters
Type |
Name |
Description |
Int32[] |
chars |
Array which contains the text.
|
Int32 |
insertionIndex |
The index of where the new character will be inserted
|
Int32 |
tagLength |
Length of the tag being replaced.
|
Char |
c |
The replacement character.
|
ResizeLineExtents(Int32)
Function to increase the size of the Line Extents Array.
Declaration
protected void ResizeLineExtents(int size)
Parameters
Type |
Name |
Description |
Int32 |
size |
|
RestoreWordWrappingState(ref WordWrapState)
Restore the State of various variables used in the mesh creation loop.
Declaration
protected int RestoreWordWrappingState(ref WordWrapState state)
Parameters
Returns
SaveGlyphVertexInfo(Single, Single, Color32)
Store vertex information for each character.
Declaration
protected virtual void SaveGlyphVertexInfo(float padding, float style_padding, Color32 vertexColor)
Parameters
Type |
Name |
Description |
Single |
padding |
|
Single |
style_padding |
Style_padding.
|
Color32 |
vertexColor |
Vertex color.
|
SaveSpriteVertexInfo(Color32)
Store vertex information for each sprite.
Declaration
protected virtual void SaveSpriteVertexInfo(Color32 vertexColor)
Parameters
Type |
Name |
Description |
Color32 |
vertexColor |
|
SaveWordWrappingState(ref WordWrapState, Int32, Int32)
Save the State of various variables used in the mesh creation loop in conjunction with Word Wrapping
Declaration
protected void SaveWordWrappingState(ref WordWrapState state, int index, int count)
Parameters
SetActiveSubMeshes(Boolean)
Method to Enable or Disable child SubMesh objects.
Declaration
protected virtual void SetActiveSubMeshes(bool state)
Parameters
Type |
Name |
Description |
Boolean |
state |
|
SetArraySizes(Int32[])
Method used to determine the number of visible characters and required buffer allocations.
Declaration
protected virtual int SetArraySizes(int[] chars)
Parameters
Type |
Name |
Description |
Int32[] |
chars |
|
Returns
SetCharArray(Char[])
Character array containing the text to be displayed.
Declaration
public void SetCharArray(char[] sourceText)
Parameters
Type |
Name |
Description |
Char[] |
sourceText |
|
SetCharArray(Char[], Int32, Int32)
Character array containing the text to be displayed.
Declaration
public void SetCharArray(char[] sourceText, int start, int length)
Parameters
SetCharArray(Int32[], Int32, Int32)
Character array containing the text to be displayed.
Declaration
public void SetCharArray(int[] sourceText, int start, int length)
Parameters
SetCulling()
Set the culling mode on the material.
Declaration
protected virtual void SetCulling()
SetFaceColor(Color32)
Function called internally to set the face color of the material. This will results in an instance of the material.
Declaration
protected virtual void SetFaceColor(Color32 color)
Parameters
Type |
Name |
Description |
Color32 |
color |
|
SetFontBaseMaterial(Material)
Function called internally when assigning a new base material.
Declaration
protected virtual void SetFontBaseMaterial(Material mat)
Parameters
Type |
Name |
Description |
Material |
mat |
|
SetOutlineColor(Color32)
Function called internally to set the outline color of the material. This will results in an instance of the material.
Declaration
protected virtual void SetOutlineColor(Color32 color)
Parameters
Type |
Name |
Description |
Color32 |
color |
|
SetOutlineThickness(Single)
Function called internally to set the outline thickness property of the material. This will results in an instance of the material.
Declaration
protected virtual void SetOutlineThickness(float thickness)
Parameters
Type |
Name |
Description |
Single |
thickness |
|
SetShaderDepth()
Set the Render Queue and ZTest mode on the current material
Declaration
protected virtual void SetShaderDepth()
SetSharedMaterial(Material)
Function called internally when a new shared material is assigned via the fontSharedMaterial property.
Declaration
protected virtual void SetSharedMaterial(Material mat)
Parameters
Type |
Name |
Description |
Material |
mat |
|
SetSharedMaterials(Material[])
Declaration
protected virtual void SetSharedMaterials(Material[] materials)
Parameters
Type |
Name |
Description |
Material[] |
materials |
|
SetText(String)
Declaration
public void SetText(string text)
Parameters
Type |
Name |
Description |
String |
text |
|
SetText(String, Boolean)
Declaration
public void SetText(string text, bool syncTextInputBox)
Parameters
SetText(String, Single)
Formatted string containing a pattern and a value representing the text to be rendered.
ex. TextMeshPro.SetText ("Number is {0:1}.", 5.56f);
Declaration
public void SetText(string text, float arg0)
Parameters
Type |
Name |
Description |
String |
text |
String containing the pattern."
|
Single |
arg0 |
Value is a float.
|
SetText(String, Single, Single)
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);
Declaration
public void SetText(string text, float arg0, float arg1)
Parameters
Type |
Name |
Description |
String |
text |
String containing the pattern."
|
Single |
arg0 |
Value is a float.
|
Single |
arg1 |
Value is a float.
|
SetText(String, Single, Single, Single)
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);
Declaration
public void SetText(string text, float arg0, float arg1, float arg2)
Parameters
Type |
Name |
Description |
String |
text |
String containing the pattern."
|
Single |
arg0 |
Value is a float.
|
Single |
arg1 |
Value is a float.
|
Single |
arg2 |
Value is a float.
|
SetText(StringBuilder)
Set the text using a StringBuilder.
Declaration
public void SetText(StringBuilder text)
Parameters
Type |
Name |
Description |
StringBuilder |
text |
StringBuilder with text to display.
|
SetTextArrayToCharArray(Char[], ref Int32[])
Copies Content of formatted SetText() to charBuffer.
Declaration
protected void SetTextArrayToCharArray(char[] sourceText, ref int[] charBuffer)
Parameters
Type |
Name |
Description |
Char[] |
sourceText |
|
Int32[] |
charBuffer |
|
SetTextSortingOrder(Int32[])
Function to sort the geometry of the text object in accordance to the provided order.
Declaration
protected void SetTextSortingOrder(int[] order)
Parameters
Type |
Name |
Description |
Int32[] |
order |
|
SetTextSortingOrder(VertexSortingOrder)
Function to control the sorting of the geometry of the text object.
Declaration
protected void SetTextSortingOrder(VertexSortingOrder order)
Parameters
SetVertexColorGradient(TMP_ColorGradient)
Declaration
protected void SetVertexColorGradient(TMP_ColorGradient gradient)
Parameters
SetVertices(Vector3[])
Function to push a new set of vertices to the mesh.
Declaration
public virtual void SetVertices(Vector3[] vertices)
Parameters
Type |
Name |
Description |
Vector3[] |
vertices |
|
StringBuilderToIntArray(StringBuilder, ref Int32[])
Copy contents of StringBuilder into int array.
Declaration
protected void StringBuilderToIntArray(StringBuilder sourceText, ref int[] charBuffer)
Parameters
Type |
Name |
Description |
StringBuilder |
sourceText |
Text to copy.
|
Int32[] |
charBuffer |
Array to store contents.
|
StringToCharArray(String, ref Int32[])
Method to store the content of a string into an integer array.
Declaration
protected void StringToCharArray(string sourceText, ref int[] charBuffer)
Parameters
Type |
Name |
Description |
String |
sourceText |
|
Int32[] |
charBuffer |
|
UpdateGeometry(Mesh, Int32)
Function to update the geometry of the main and sub text objects.
Declaration
public virtual void UpdateGeometry(Mesh mesh, int index)
Parameters
Type |
Name |
Description |
Mesh |
mesh |
|
Int32 |
index |
|
UpdateMeshPadding()
Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script.
Declaration
public virtual void UpdateMeshPadding()
UpdateVertexData()
Function to push the updated vertex data into the mesh and renderer.
Declaration
public virtual void UpdateVertexData()
UpdateVertexData(TMP_VertexDataUpdateFlags)
Function to push the updated vertex data into the mesh and renderer.
Declaration
public virtual void UpdateVertexData(TMP_VertexDataUpdateFlags flags)
Parameters
ValidateHtmlTag(Int32[], Int32, out Int32)
Function to identify and validate the rich tag. Returns the position of the > if the tag was valid.
Declaration
protected bool ValidateHtmlTag(int[] chars, int startIndex, out int endIndex)
Parameters
Returns