docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TMP_Text

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

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    UIBehaviour
    Graphic
    MaskableGraphic
    TMP_Text
    TextMeshPro
    TextMeshProUGUI
    Implements
    ICanvasElement
    IClippable
    IMaskable
    IMaterialModifier
    Inherited Members
    MaskableGraphic.m_ShouldRecalculateStencil
    MaskableGraphic.m_MaskMaterial
    MaskableGraphic.onCullStateChanged
    MaskableGraphic.maskable
    MaskableGraphic.isMaskingGraphic
    MaskableGraphic.m_StencilValue
    MaskableGraphic.GetModifiedMaterial(Material)
    MaskableGraphic.Cull(Rect, bool)
    MaskableGraphic.SetClipRect(Rect, bool)
    MaskableGraphic.SetClipSoftness(Vector2)
    MaskableGraphic.OnEnable()
    MaskableGraphic.OnDisable()
    MaskableGraphic.OnValidate()
    MaskableGraphic.OnTransformParentChanged()
    MaskableGraphic.OnCanvasHierarchyChanged()
    MaskableGraphic.RecalculateClipping()
    MaskableGraphic.RecalculateMasking()
    Graphic.s_DefaultUI
    Graphic.s_WhiteTexture
    Graphic.defaultGraphicMaterial
    Graphic.m_Material
    Graphic.m_SkipLayoutUpdate
    Graphic.m_SkipMaterialUpdate
    Graphic.raycastTarget
    Graphic.raycastPadding
    Graphic.m_OnDirtyLayoutCallback
    Graphic.m_OnDirtyVertsCallback
    Graphic.m_OnDirtyMaterialCallback
    Graphic.s_Mesh
    Graphic.m_CachedMesh
    Graphic.m_CachedUvs
    Graphic.useLegacyMeshGeneration
    Graphic.SetAllDirty()
    Graphic.SetLayoutDirty()
    Graphic.SetVerticesDirty()
    Graphic.SetMaterialDirty()
    Graphic.SetRaycastDirty()
    Graphic.OnRectTransformDimensionsChange()
    Graphic.OnBeforeTransformParentChanged()
    Graphic.depth
    Graphic.canvas
    Graphic.canvasRenderer
    Graphic.defaultMaterial
    Graphic.material
    Graphic.materialForRendering
    Graphic.mainTexture
    Graphic.OnDestroy()
    Graphic.OnCullingChanged()
    Graphic.Rebuild(CanvasUpdate)
    Graphic.LayoutComplete()
    Graphic.GraphicUpdateComplete()
    Graphic.UpdateMaterial()
    Graphic.UpdateGeometry()
    Graphic.workerMesh
    Graphic.OnPopulateMesh(Mesh)
    Graphic.OnPopulateMesh(VertexHelper)
    Graphic.OnRebuildRequested()
    Graphic.Reset()
    Graphic.OnDidApplyAnimationProperties()
    Graphic.SetNativeSize()
    Graphic.Raycast(Vector2, Camera)
    Graphic.PixelAdjustPoint(Vector2)
    Graphic.GetPixelAdjustedRect()
    Graphic.CrossFadeColor(Color, float, bool, bool, bool)
    Graphic.RegisterDirtyLayoutCallback(UnityAction)
    Graphic.UnregisterDirtyLayoutCallback(UnityAction)
    Graphic.RegisterDirtyVerticesCallback(UnityAction)
    Graphic.UnregisterDirtyVerticesCallback(UnityAction)
    Graphic.RegisterDirtyMaterialCallback(UnityAction)
    Graphic.UnregisterDirtyMaterialCallback(UnityAction)
    UIBehaviour.Awake()
    UIBehaviour.Start()
    UIBehaviour.IsActive()
    UIBehaviour.OnCanvasGroupChanged()
    UIBehaviour.IsDestroyed()
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: TMPro
    Assembly: Unity.TextMeshPro.dll
    Syntax
    public abstract class TMP_Text : MaskableGraphic, ICanvasElement, IClippable, IMaskable, IMaterialModifier

    Fields

    checkPaddingRequired

    Declaration
    [SerializeField]
    protected bool checkPaddingRequired
    Field Value
    Type Description
    bool

    isMaskUpdateRequired

    Declaration
    protected bool isMaskUpdateRequired
    Field Value
    Type Description
    bool

    k_LargeNegativeFloat

    Declaration
    protected static float k_LargeNegativeFloat
    Field Value
    Type Description
    float

    k_LargeNegativeInt

    Declaration
    protected static int k_LargeNegativeInt
    Field Value
    Type Description
    int

    k_LargeNegativeVector2

    Declaration
    protected static Vector2 k_LargeNegativeVector2
    Field Value
    Type Description
    Vector2

    k_LargePositiveFloat

    Declaration
    protected static float k_LargePositiveFloat
    Field Value
    Type Description
    float

    k_LargePositiveInt

    Declaration
    protected static int k_LargePositiveInt
    Field Value
    Type Description
    int

    k_LargePositiveVector2

    Declaration
    protected static Vector2 k_LargePositiveVector2
    Field Value
    Type Description
    Vector2

    m_ActiveFontFeatures

    Declaration
    [SerializeField]
    protected List<OTL_FeatureTag> m_ActiveFontFeatures
    Field Value
    Type Description
    List<OTL_FeatureTag>

    m_AutoSizeIterationCount

    Declaration
    protected int m_AutoSizeIterationCount
    Field Value
    Type Description
    int

    m_AutoSizeMaxIterationCount

    Declaration
    protected int m_AutoSizeMaxIterationCount
    Field Value
    Type Description
    int

    m_ElementAscender

    Declaration
    protected float m_ElementAscender
    Field Value
    Type Description
    float

    m_ElementDescender

    Declaration
    protected float m_ElementDescender
    Field Value
    Type Description
    float

    m_Ellipsis

    Declaration
    protected TMP_Text.SpecialCharacter m_Ellipsis
    Field Value
    Type Description
    TMP_Text.SpecialCharacter

    m_FXRotation

    Declaration
    protected Quaternion m_FXRotation
    Field Value
    Type Description
    Quaternion

    m_FXScale

    Declaration
    protected Vector3 m_FXScale
    Field Value
    Type Description
    Vector3

    m_FontStyleInternal

    Declaration
    protected FontStyles m_FontStyleInternal
    Field Value
    Type Description
    FontStyles

    m_FontWeightInternal

    Declaration
    protected FontWeight m_FontWeightInternal
    Field Value
    Type Description
    FontWeight

    m_FontWeightStack

    Declaration
    protected TMP_TextProcessingStack<FontWeight> m_FontWeightStack
    Field Value
    Type Description
    TMP_TextProcessingStack<FontWeight>

    m_HighlightStateStack

    Declaration
    protected TMP_TextProcessingStack<HighlightState> m_HighlightStateStack
    Field Value
    Type Description
    TMP_TextProcessingStack<HighlightState>

    m_HorizontalAlignment

    Declaration
    [SerializeField]
    protected HorizontalAlignmentOptions m_HorizontalAlignment
    Field Value
    Type Description
    HorizontalAlignmentOptions

    m_IsAutoSizePointSizeSet

    Declaration
    protected bool m_IsAutoSizePointSizeSet
    Field Value
    Type Description
    bool

    m_IsDrivenLineSpacing

    Declaration
    protected bool m_IsDrivenLineSpacing
    Field Value
    Type Description
    bool

    m_IsTextObjectScaleStatic

    Declaration
    [SerializeField]
    protected bool m_IsTextObjectScaleStatic
    Field Value
    Type Description
    bool

    m_ItalicAngle

    Declaration
    protected int m_ItalicAngle
    Field Value
    Type Description
    int

    m_ItalicAngleStack

    Declaration
    protected TMP_TextProcessingStack<int> m_ItalicAngleStack
    Field Value
    Type Description
    TMP_TextProcessingStack<int>

    m_LastBaseGlyphIndex

    Declaration
    protected int m_LastBaseGlyphIndex
    Field Value
    Type Description
    int

    m_LayoutElement

    Declaration
    protected LayoutElement m_LayoutElement
    Field Value
    Type Description
    LayoutElement

    m_PageAscender

    Declaration
    protected float m_PageAscender
    Field Value
    Type Description
    float

    m_PreviousPivotPosition

    Used to track potential changes in pivot position to allow us to ignore OnRectTransformDimensionsChange getting called due to rounding errors when using Stretch Anchors.

    Declaration
    protected Vector2 m_PreviousPivotPosition
    Field Value
    Type Description
    Vector2

    m_PreviousRectTransformSize

    Used to track potential changes in RectTransform size to allow us to ignore OnRectTransformDimensionsChange getting called due to rounding errors when using Stretch Anchors.

    Declaration
    protected Vector2 m_PreviousRectTransformSize
    Field Value
    Type Description
    Vector2

    m_RenderedHeight

    Declaration
    protected float m_RenderedHeight
    Field Value
    Type Description
    float

    m_RenderedWidth

    Declaration
    protected float m_RenderedWidth
    Field Value
    Type Description
    float

    m_StyleSheet

    Declaration
    [SerializeField]
    protected TMP_StyleSheet m_StyleSheet
    Field Value
    Type Description
    TMP_StyleSheet

    m_TextPreprocessor

    Declaration
    [SerializeField]
    protected ITextPreprocessor m_TextPreprocessor
    Field Value
    Type Description
    ITextPreprocessor

    m_TextStyleHashCode

    Declaration
    [SerializeField]
    protected int m_TextStyleHashCode
    Field Value
    Type Description
    int

    m_TextStyleStackDepth

    Declaration
    protected int m_TextStyleStackDepth
    Field Value
    Type Description
    int

    m_TextStyleStacks

    Declaration
    protected TMP_TextProcessingStack<int>[] m_TextStyleStacks
    Field Value
    Type Description
    TMP_TextProcessingStack<int>[]

    m_TextWrappingMode

    Declaration
    [SerializeField]
    [FormerlySerializedAs("m_enableWordWrapping")]
    protected TextWrappingModes m_TextWrappingMode
    Field Value
    Type Description
    TextWrappingModes

    m_Underline

    Declaration
    protected TMP_Text.SpecialCharacter m_Underline
    Field Value
    Type Description
    TMP_Text.SpecialCharacter

    m_VertexBufferAutoSizeReduction

    Declaration
    [SerializeField]
    protected bool m_VertexBufferAutoSizeReduction
    Field Value
    Type Description
    bool

    m_VerticalAlignment

    Declaration
    [SerializeField]
    protected VerticalAlignmentOptions m_VerticalAlignment
    Field Value
    Type Description
    VerticalAlignmentOptions

    m_actionStack

    Declaration
    protected TMP_TextProcessingStack<int> m_actionStack
    Field Value
    Type Description
    TMP_TextProcessingStack<int>

    m_autoSizeTextContainer

    Declaration
    protected bool m_autoSizeTextContainer
    Field Value
    Type Description
    bool

    m_baselineOffset

    Declaration
    protected float m_baselineOffset
    Field Value
    Type Description
    float

    m_baselineOffsetStack

    Declaration
    protected TMP_TextProcessingStack<float> m_baselineOffsetStack
    Field Value
    Type Description
    TMP_TextProcessingStack<float>

    m_cSpacing

    Declaration
    protected float m_cSpacing
    Field Value
    Type Description
    float

    m_cached_TextElement

    Declaration
    protected TMP_TextElement m_cached_TextElement
    Field Value
    Type Description
    TMP_TextElement

    m_charWidthAdjDelta

    Declaration
    protected float m_charWidthAdjDelta
    Field Value
    Type Description
    float

    m_charWidthMaxAdj

    Declaration
    [SerializeField]
    protected float m_charWidthMaxAdj
    Field Value
    Type Description
    float

    m_characterCount

    Declaration
    protected int m_characterCount
    Field Value
    Type Description
    int

    m_characterSpacing

    Declaration
    [SerializeField]
    protected float m_characterSpacing
    Field Value
    Type Description
    float

    m_colorGradientPreset

    Declaration
    protected TMP_ColorGradient m_colorGradientPreset
    Field Value
    Type Description
    TMP_ColorGradient

    m_colorGradientPresetIsTinted

    Declaration
    protected bool m_colorGradientPresetIsTinted
    Field Value
    Type Description
    bool

    m_colorGradientStack

    Declaration
    protected TMP_TextProcessingStack<TMP_ColorGradient> m_colorGradientStack
    Field Value
    Type Description
    TMP_TextProcessingStack<TMP_ColorGradient>

    m_colorMode

    Declaration
    [SerializeField]
    protected ColorMode m_colorMode
    Field Value
    Type Description
    ColorMode

    m_colorStack

    Declaration
    protected TMP_TextProcessingStack<Color32> m_colorStack
    Field Value
    Type Description
    TMP_TextProcessingStack<Color32>

    m_currentFontAsset

    Declaration
    protected TMP_FontAsset m_currentFontAsset
    Field Value
    Type Description
    TMP_FontAsset

    m_currentFontSize

    Declaration
    protected float m_currentFontSize
    Field Value
    Type Description
    float

    m_currentMaterial

    Declaration
    protected Material m_currentMaterial
    Field Value
    Type Description
    Material

    m_currentMaterialIndex

    Declaration
    protected int m_currentMaterialIndex
    Field Value
    Type Description
    int

    m_currentSpriteAsset

    Declaration
    protected TMP_SpriteAsset m_currentSpriteAsset
    Field Value
    Type Description
    TMP_SpriteAsset

    m_defaultSpriteAsset

    Declaration
    protected TMP_SpriteAsset m_defaultSpriteAsset
    Field Value
    Type Description
    TMP_SpriteAsset

    m_duoSpace

    Declaration
    protected bool m_duoSpace
    Field Value
    Type Description
    bool

    m_enableAutoSizing

    Declaration
    [SerializeField]
    protected bool m_enableAutoSizing
    Field Value
    Type Description
    bool

    m_enableExtraPadding

    Declaration
    [SerializeField]
    protected bool m_enableExtraPadding
    Field Value
    Type Description
    bool

    m_enableKerning

    Declaration
    [SerializeField]
    protected bool m_enableKerning
    Field Value
    Type Description
    bool

    m_enableVertexGradient

    Declaration
    [SerializeField]
    protected bool m_enableVertexGradient
    Field Value
    Type Description
    bool

    m_faceColor

    Declaration
    [SerializeField]
    protected Color32 m_faceColor
    Field Value
    Type Description
    Color32

    m_firstCharacterOfLine

    Declaration
    protected int m_firstCharacterOfLine
    Field Value
    Type Description
    int

    m_firstOverflowCharacterIndex

    Declaration
    protected int m_firstOverflowCharacterIndex
    Field Value
    Type Description
    int

    m_firstVisibleCharacter

    Declaration
    protected int m_firstVisibleCharacter
    Field Value
    Type Description
    int

    m_firstVisibleCharacterOfLine

    Declaration
    protected int m_firstVisibleCharacterOfLine
    Field Value
    Type Description
    int

    m_flexibleHeight

    Declaration
    protected float m_flexibleHeight
    Field Value
    Type Description
    float

    m_flexibleWidth

    Declaration
    protected float m_flexibleWidth
    Field Value
    Type Description
    float

    m_fontAsset

    Declaration
    [SerializeField]
    protected TMP_FontAsset m_fontAsset
    Field Value
    Type Description
    TMP_FontAsset

    m_fontColor

    Declaration
    [SerializeField]
    protected Color m_fontColor
    Field Value
    Type Description
    Color

    m_fontColor32

    Declaration
    [SerializeField]
    protected Color32 m_fontColor32
    Field Value
    Type Description
    Color32

    m_fontColorGradient

    Declaration
    [SerializeField]
    protected VertexGradient m_fontColorGradient
    Field Value
    Type Description
    VertexGradient

    m_fontColorGradientPreset

    Declaration
    [SerializeField]
    protected TMP_ColorGradient m_fontColorGradientPreset
    Field Value
    Type Description
    TMP_ColorGradient

    m_fontMaterial

    Declaration
    [SerializeField]
    protected Material m_fontMaterial
    Field Value
    Type Description
    Material

    m_fontMaterials

    Declaration
    [SerializeField]
    protected Material[] m_fontMaterials
    Field Value
    Type Description
    Material[]

    m_fontScaleMultiplier

    Declaration
    protected float m_fontScaleMultiplier
    Field Value
    Type Description
    float

    m_fontSharedMaterials

    Declaration
    [SerializeField]
    protected Material[] m_fontSharedMaterials
    Field Value
    Type Description
    Material[]

    m_fontSize

    Declaration
    [SerializeField]
    protected float m_fontSize
    Field Value
    Type Description
    float

    m_fontSizeBase

    Declaration
    [SerializeField]
    protected float m_fontSizeBase
    Field Value
    Type Description
    float

    m_fontSizeMax

    Declaration
    [SerializeField]
    protected float m_fontSizeMax
    Field Value
    Type Description
    float

    m_fontSizeMin

    Declaration
    [SerializeField]
    protected float m_fontSizeMin
    Field Value
    Type Description
    float

    m_fontStyle

    Declaration
    [SerializeField]
    protected FontStyles m_fontStyle
    Field Value
    Type Description
    FontStyles

    m_fontStyleStack

    Declaration
    protected TMP_FontStyleStack m_fontStyleStack
    Field Value
    Type Description
    TMP_FontStyleStack

    m_fontWeight

    Declaration
    [SerializeField]
    protected FontWeight m_fontWeight
    Field Value
    Type Description
    FontWeight

    m_geometrySortingOrder

    Declaration
    [SerializeField]
    protected VertexSortingOrder m_geometrySortingOrder
    Field Value
    Type Description
    VertexSortingOrder

    m_havePropertiesChanged

    Declaration
    protected bool m_havePropertiesChanged
    Field Value
    Type Description
    bool

    m_horizontalMapping

    Declaration
    [SerializeField]
    protected TextureMappingOptions m_horizontalMapping
    Field Value
    Type Description
    TextureMappingOptions

    m_htmlColor

    Declaration
    protected Color32 m_htmlColor
    Field Value
    Type Description
    Color32

    m_ignoreActiveState

    Declaration
    protected bool m_ignoreActiveState
    Field Value
    Type Description
    bool

    m_ignoreCulling

    Declaration
    protected bool m_ignoreCulling
    Field Value
    Type Description
    bool

    m_indentStack

    Declaration
    protected TMP_TextProcessingStack<float> m_indentStack
    Field Value
    Type Description
    TMP_TextProcessingStack<float>

    m_isAwake

    Declaration
    protected bool m_isAwake
    Field Value
    Type Description
    bool

    m_isCalculatingPreferredValues

    Declaration
    protected bool m_isCalculatingPreferredValues
    Field Value
    Type Description
    bool

    m_isCharacterWrappingEnabled

    Declaration
    protected bool m_isCharacterWrappingEnabled
    Field Value
    Type Description
    bool

    m_isCullingEnabled

    Declaration
    [SerializeField]
    protected bool m_isCullingEnabled
    Field Value
    Type Description
    bool

    m_isIgnoringAlignment

    Declaration
    protected bool m_isIgnoringAlignment
    Field Value
    Type Description
    bool

    m_isLayoutDirty

    Declaration
    protected bool m_isLayoutDirty
    Field Value
    Type Description
    bool

    m_isMaskingEnabled

    Declaration
    protected bool m_isMaskingEnabled
    Field Value
    Type Description
    bool

    m_isMaterialDirty

    Declaration
    protected bool m_isMaterialDirty
    Field Value
    Type Description
    bool

    m_isNewPage

    Declaration
    protected bool m_isNewPage
    Field Value
    Type Description
    bool

    m_isNonBreakingSpace

    Declaration
    protected bool m_isNonBreakingSpace
    Field Value
    Type Description
    bool

    m_isOrthographic

    Declaration
    [SerializeField]
    protected bool m_isOrthographic
    Field Value
    Type Description
    bool

    m_isOverlay

    Declaration
    protected bool m_isOverlay
    Field Value
    Type Description
    bool

    m_isPreferredHeightDirty

    Declaration
    protected bool m_isPreferredHeightDirty
    Field Value
    Type Description
    bool

    m_isPreferredWidthDirty

    Declaration
    protected bool m_isPreferredWidthDirty
    Field Value
    Type Description
    bool

    m_isRichText

    Declaration
    [SerializeField]
    protected bool m_isRichText
    Field Value
    Type Description
    bool

    m_isRightToLeft

    Declaration
    [SerializeField]
    protected bool m_isRightToLeft
    Field Value
    Type Description
    bool

    m_isSDFShader

    Declaration
    protected bool m_isSDFShader
    Field Value
    Type Description
    bool

    m_isTextLayoutPhase

    Declaration
    protected bool m_isTextLayoutPhase
    Field Value
    Type Description
    bool

    m_isTextTruncated

    Declaration
    protected bool m_isTextTruncated
    Field Value
    Type Description
    bool

    m_isUsingBold

    Declaration
    protected bool m_isUsingBold
    Field Value
    Type Description
    bool

    m_isUsingLegacyAnimationComponent

    Declaration
    [SerializeField]
    protected bool m_isUsingLegacyAnimationComponent
    Field Value
    Type Description
    bool

    m_isVolumetricText

    Declaration
    [SerializeField]
    protected bool m_isVolumetricText
    Field Value
    Type Description
    bool

    m_lastCharacterOfLine

    Declaration
    protected int m_lastCharacterOfLine
    Field Value
    Type Description
    int

    m_lastVisibleCharacterOfLine

    Declaration
    protected int m_lastVisibleCharacterOfLine
    Field Value
    Type Description
    int

    m_layoutPriority

    Declaration
    protected int m_layoutPriority
    Field Value
    Type Description
    int

    m_lineHeight

    Declaration
    protected float m_lineHeight
    Field Value
    Type Description
    float

    m_lineJustification

    Declaration
    protected HorizontalAlignmentOptions m_lineJustification
    Field Value
    Type Description
    HorizontalAlignmentOptions

    m_lineJustificationStack

    Declaration
    protected TMP_TextProcessingStack<HorizontalAlignmentOptions> m_lineJustificationStack
    Field Value
    Type Description
    TMP_TextProcessingStack<HorizontalAlignmentOptions>

    m_lineNumber

    Declaration
    protected int m_lineNumber
    Field Value
    Type Description
    int

    m_lineOffset

    Declaration
    protected float m_lineOffset
    Field Value
    Type Description
    float

    m_lineSpacing

    Declaration
    [SerializeField]
    protected float m_lineSpacing
    Field Value
    Type Description
    float

    m_lineSpacingDelta

    Declaration
    protected float m_lineSpacingDelta
    Field Value
    Type Description
    float

    m_lineSpacingMax

    Declaration
    [SerializeField]
    protected float m_lineSpacingMax
    Field Value
    Type Description
    float

    m_lineVisibleCharacterCount

    Declaration
    protected int m_lineVisibleCharacterCount
    Field Value
    Type Description
    int

    m_lineVisibleSpaceCount

    Declaration
    protected int m_lineVisibleSpaceCount
    Field Value
    Type Description
    int

    m_linkedTextComponent

    Declaration
    [SerializeField]
    protected TMP_Text m_linkedTextComponent
    Field Value
    Type Description
    TMP_Text

    m_margin

    Declaration
    [SerializeField]
    protected Vector4 m_margin
    Field Value
    Type Description
    Vector4

    m_marginHeight

    Declaration
    protected float m_marginHeight
    Field Value
    Type Description
    float

    m_marginLeft

    Declaration
    protected float m_marginLeft
    Field Value
    Type Description
    float

    m_marginRight

    Declaration
    protected float m_marginRight
    Field Value
    Type Description
    float

    m_marginWidth

    Declaration
    protected float m_marginWidth
    Field Value
    Type Description
    float

    m_materialReferenceIndexLookup

    Declaration
    protected static Dictionary<int, int> m_materialReferenceIndexLookup
    Field Value
    Type Description
    Dictionary<int, int>

    m_materialReferenceStack

    Declaration
    protected static TMP_TextProcessingStack<MaterialReference> m_materialReferenceStack
    Field Value
    Type Description
    TMP_TextProcessingStack<MaterialReference>

    m_materialReferences

    Declaration
    protected static MaterialReference[] m_materialReferences
    Field Value
    Type Description
    MaterialReference[]

    m_maxCapHeight

    Declaration
    protected float m_maxCapHeight
    Field Value
    Type Description
    float

    m_maxFontSize

    Declaration
    protected float m_maxFontSize
    Field Value
    Type Description
    float

    m_maxHeight

    Declaration
    protected float m_maxHeight
    Field Value
    Type Description
    float

    m_maxLineAscender

    Declaration
    protected float m_maxLineAscender
    Field Value
    Type Description
    float

    m_maxLineDescender

    Declaration
    protected float m_maxLineDescender
    Field Value
    Type Description
    float

    m_maxTextAscender

    Declaration
    protected float m_maxTextAscender
    Field Value
    Type Description
    float

    m_maxVisibleCharacters

    Declaration
    protected int m_maxVisibleCharacters
    Field Value
    Type Description
    int

    m_maxVisibleLines

    Declaration
    protected int m_maxVisibleLines
    Field Value
    Type Description
    int

    m_maxVisibleWords

    Declaration
    protected int m_maxVisibleWords
    Field Value
    Type Description
    int

    m_maxWidth

    Declaration
    protected float m_maxWidth
    Field Value
    Type Description
    float

    m_mesh

    Declaration
    protected Mesh m_mesh
    Field Value
    Type Description
    Mesh

    m_meshExtents

    Declaration
    protected Extents m_meshExtents
    Field Value
    Type Description
    Extents

    m_minFontSize

    Declaration
    protected float m_minFontSize
    Field Value
    Type Description
    float

    m_minHeight

    Declaration
    protected float m_minHeight
    Field Value
    Type Description
    float

    m_minWidth

    Declaration
    protected float m_minWidth
    Field Value
    Type Description
    float

    m_monoSpacing

    Declaration
    protected float m_monoSpacing
    Field Value
    Type Description
    float

    m_outlineColor

    Declaration
    protected Color32 m_outlineColor
    Field Value
    Type Description
    Color32

    m_outlineWidth

    Declaration
    protected float m_outlineWidth
    Field Value
    Type Description
    float

    m_overflowMode

    Declaration
    [SerializeField]
    protected TextOverflowModes m_overflowMode
    Field Value
    Type Description
    TextOverflowModes

    m_overrideHtmlColors

    Declaration
    [SerializeField]
    protected bool m_overrideHtmlColors
    Field Value
    Type Description
    bool

    m_padding

    Declaration
    protected float m_padding
    Field Value
    Type Description
    float

    m_pageNumber

    Declaration
    protected int m_pageNumber
    Field Value
    Type Description
    int

    m_pageToDisplay

    Declaration
    [SerializeField]
    protected int m_pageToDisplay
    Field Value
    Type Description
    int

    m_paragraphSpacing

    Declaration
    [SerializeField]
    protected float m_paragraphSpacing
    Field Value
    Type Description
    float

    m_parseCtrlCharacters

    Declaration
    [SerializeField]
    protected bool m_parseCtrlCharacters
    Field Value
    Type Description
    bool

    m_preferredHeight

    Declaration
    protected float m_preferredHeight
    Field Value
    Type Description
    float

    m_preferredWidth

    Declaration
    protected float m_preferredWidth
    Field Value
    Type Description
    float

    m_rectTransform

    Declaration
    protected RectTransform m_rectTransform
    Field Value
    Type Description
    RectTransform

    m_renderMode

    Declaration
    protected TextRenderFlags m_renderMode
    Field Value
    Type Description
    TextRenderFlags

    m_sharedMaterial

    Declaration
    [SerializeField]
    protected Material m_sharedMaterial
    Field Value
    Type Description
    Material

    m_sizeStack

    Declaration
    protected TMP_TextProcessingStack<float> m_sizeStack
    Field Value
    Type Description
    TMP_TextProcessingStack<float>

    m_spacing

    Declaration
    protected float m_spacing
    Field Value
    Type Description
    float

    m_spriteAnimationID

    Declaration
    protected int m_spriteAnimationID
    Field Value
    Type Description
    int

    m_spriteAnimator

    Declaration
    protected TMP_SpriteAnimator m_spriteAnimator
    Field Value
    Type Description
    TMP_SpriteAnimator

    m_spriteAsset

    Declaration
    [SerializeField]
    protected TMP_SpriteAsset m_spriteAsset
    Field Value
    Type Description
    TMP_SpriteAsset

    m_spriteColor

    Declaration
    protected Color32 m_spriteColor
    Field Value
    Type Description
    Color32

    m_spriteCount

    Declaration
    protected int m_spriteCount
    Field Value
    Type Description
    int

    m_spriteIndex

    Declaration
    protected int m_spriteIndex
    Field Value
    Type Description
    int

    m_startOfLineAscender

    Declaration
    protected float m_startOfLineAscender
    Field Value
    Type Description
    float

    m_startOfLineDescender

    Declaration
    protected float m_startOfLineDescender
    Field Value
    Type Description
    float

    m_strikethroughColor

    Declaration
    protected Color32 m_strikethroughColor
    Field Value
    Type Description
    Color32

    m_strikethroughColorStack

    Declaration
    protected TMP_TextProcessingStack<Color32> m_strikethroughColorStack
    Field Value
    Type Description
    TMP_TextProcessingStack<Color32>

    m_tabSpacing

    Declaration
    protected float m_tabSpacing
    Field Value
    Type Description
    float

    m_text

    Declaration
    [SerializeField]
    [TextArea(5, 10)]
    protected string m_text
    Field Value
    Type Description
    string

    m_textAlignment

    Declaration
    [SerializeField]
    [FormerlySerializedAs("m_lineJustification")]
    protected TextAlignmentOptions m_textAlignment
    Field Value
    Type Description
    TextAlignmentOptions

    m_textContainerLocalCorners

    Declaration
    protected Vector3[] m_textContainerLocalCorners
    Field Value
    Type Description
    Vector3[]

    m_textElementType

    Declaration
    protected TMP_TextElementType m_textElementType
    Field Value
    Type Description
    TMP_TextElementType

    m_textInfo

    Declaration
    protected TMP_TextInfo m_textInfo
    Field Value
    Type Description
    TMP_TextInfo

    m_tintAllSprites

    Declaration
    [SerializeField]
    protected bool m_tintAllSprites
    Field Value
    Type Description
    bool

    m_tintSprite

    Declaration
    protected bool m_tintSprite
    Field Value
    Type Description
    bool

    m_totalCharacterCount

    Declaration
    protected int m_totalCharacterCount
    Field Value
    Type Description
    int

    m_transform

    Declaration
    protected Transform m_transform
    Field Value
    Type Description
    Transform

    m_underlineColor

    Declaration
    protected Color32 m_underlineColor
    Field Value
    Type Description
    Color32

    m_underlineColorStack

    Declaration
    protected TMP_TextProcessingStack<Color32> m_underlineColorStack
    Field Value
    Type Description
    TMP_TextProcessingStack<Color32>

    m_useMaxVisibleDescender

    Declaration
    [SerializeField]
    protected bool m_useMaxVisibleDescender
    Field Value
    Type Description
    bool

    m_uvLineOffset

    Declaration
    [SerializeField]
    protected float m_uvLineOffset
    Field Value
    Type Description
    float

    m_verticalMapping

    Declaration
    [SerializeField]
    protected TextureMappingOptions m_verticalMapping
    Field Value
    Type Description
    TextureMappingOptions

    m_width

    Declaration
    protected float m_width
    Field Value
    Type Description
    float

    m_wordSpacing

    Declaration
    [SerializeField]
    protected float m_wordSpacing
    Field Value
    Type Description
    float

    m_wordWrappingRatios

    Declaration
    [SerializeField]
    protected float m_wordWrappingRatios
    Field Value
    Type Description
    float

    m_xAdvance

    Declaration
    protected float m_xAdvance
    Field Value
    Type Description
    float

    s_colorWhite

    Declaration
    protected static Color32 s_colorWhite
    Field Value
    Type Description
    Color32

    tag_Indent

    Declaration
    protected float tag_Indent
    Field Value
    Type Description
    float

    tag_LineIndent

    Declaration
    protected float tag_LineIndent
    Field Value
    Type Description
    float

    tag_NoParsing

    Declaration
    protected bool tag_NoParsing
    Field Value
    Type Description
    bool

    Properties

    alignment

    Text alignment options

    Declaration
    public TextAlignmentOptions alignment { get; set; }
    Property Value
    Type Description
    TextAlignmentOptions

    alpha

    Sets the vertex color alpha value.

    Declaration
    public float alpha { get; set; }
    Property Value
    Type Description
    float

    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
    Type Description
    bool

    bounds

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

    Declaration
    public Bounds bounds { get; }
    Property Value
    Type Description
    Bounds

    characterSpacing

    The amount of additional spacing between characters.

    Declaration
    public float characterSpacing { get; set; }
    Property Value
    Type Description
    float

    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
    Type Description
    float

    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
    Type Description
    Color
    Overrides
    Graphic.color

    colorGradient

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

    Declaration
    public VertexGradient colorGradient { get; set; }
    Property Value
    Type Description
    VertexGradient

    The color gradient.

    colorGradientPreset

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

    Declaration
    public TMP_ColorGradient colorGradientPreset { get; set; }
    Property Value
    Type Description
    TMP_ColorGradient

    emojiFallbackSupport

    Determines if text assets defined in the Emoji Fallback Text Assets list in the TMP Settings will be search first for characters defined as Emojis in the Unicode 14.0 standards.

    Declaration
    public bool emojiFallbackSupport { get; set; }
    Property Value
    Type Description
    bool

    enableAutoSizing

    Enable text auto-sizing

    Declaration
    public bool enableAutoSizing { get; set; }
    Property Value
    Type Description
    bool

    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
    Type Description
    bool

    enableKerning

    Determines if kerning is enabled or disabled.

    Declaration
    [Obsolete("The \"enableKerning\" property has been deprecated. Use the \"fontFeatures\" property to control what features are enabled on the text component.")]
    public bool enableKerning { get; set; }
    Property Value
    Type Description
    bool

    enableVertexGradient

    Determines if Vertex Color Gradient should be used

    Declaration
    public bool enableVertexGradient { get; set; }
    Property Value
    Type Description
    bool

    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
    [Obsolete("The enabledWordWrapping property is now obsolete. Please use the textWrappingMode property instead.")]
    public bool enableWordWrapping { get; set; }
    Property Value
    Type Description
    bool

    extraPadding

    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
    Type Description
    bool

    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
    Type Description
    Color32

    firstOverflowCharacterIndex

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

    Declaration
    public int firstOverflowCharacterIndex { get; }
    Property Value
    Type Description
    int

    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
    Type Description
    int

    flexibleHeight

    Declaration
    public float flexibleHeight { get; }
    Property Value
    Type Description
    float

    flexibleWidth

    Declaration
    public float flexibleWidth { get; }
    Property Value
    Type Description
    float

    font

    The Font Asset to be assigned to this text object.

    Declaration
    public TMP_FontAsset font { get; set; }
    Property Value
    Type Description
    TMP_FontAsset

    fontFeatures

    List of OpenType font features that are enabled.

    Declaration
    public List<OTL_FeatureTag> fontFeatures { get; set; }
    Property Value
    Type Description
    List<OTL_FeatureTag>

    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[]

    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
    Type Description
    float

    fontSizeMax

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

    Declaration
    public float fontSizeMax { get; set; }
    Property Value
    Type Description
    float

    fontSizeMin

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

    Declaration
    public float fontSizeMin { get; set; }
    Property Value
    Type Description
    float

    fontStyle

    The style of the text

    Declaration
    public FontStyles fontStyle { get; set; }
    Property Value
    Type Description
    FontStyles

    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 FontWeight fontWeight { get; set; }
    Property Value
    Type Description
    FontWeight

    geometrySortingOrder

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

    Declaration
    public VertexSortingOrder geometrySortingOrder { get; set; }
    Property Value
    Type Description
    VertexSortingOrder

    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
    Type Description
    bool

    horizontalAlignment

    Horizontal alignment options

    Declaration
    public HorizontalAlignmentOptions horizontalAlignment { get; set; }
    Property Value
    Type Description
    HorizontalAlignmentOptions

    horizontalMapping

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

    Declaration
    public TextureMappingOptions horizontalMapping { get; set; }
    Property Value
    Type Description
    TextureMappingOptions

    ignoreVisibility

    Forces objects that are not visible to get refreshed.

    Declaration
    public bool ignoreVisibility { get; set; }
    Property Value
    Type Description
    bool

    isOrthographic

    Declaration
    public bool isOrthographic { get; set; }
    Property Value
    Type Description
    bool

    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
    Type Description
    bool

    isRightToLeftText

    Declaration
    public bool isRightToLeftText { get; set; }
    Property Value
    Type Description
    bool

    isTextObjectScaleStatic

    Determines if a text object will be excluded from the InternalUpdate callback used to handle updates of SDF Scale when the scale of the text object or parent(s) changes.

    Declaration
    public bool isTextObjectScaleStatic { get; set; }
    Property Value
    Type Description
    bool

    isTextOverflowing

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

    Declaration
    public bool isTextOverflowing { get; }
    Property Value
    Type Description
    bool

    isTextTruncated

    Property indicating whether the text is Truncated or using Ellipsis.

    Declaration
    public bool isTextTruncated { get; }
    Property Value
    Type Description
    bool

    isUsingBold

    Property used in conjunction with padding calculation for the geometry.

    Declaration
    public bool isUsingBold { get; }
    Property Value
    Type Description
    bool

    isUsingLegacyAnimationComponent

    Property to handle legacy animation component.

    Declaration
    public bool isUsingLegacyAnimationComponent { get; set; }
    Property Value
    Type Description
    bool

    isVolumetricText

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

    Declaration
    public bool isVolumetricText { get; set; }
    Property Value
    Type Description
    bool

    layoutElement

    Declaration
    protected LayoutElement layoutElement { get; }
    Property Value
    Type Description
    LayoutElement

    layoutPriority

    Declaration
    public int layoutPriority { get; }
    Property Value
    Type Description
    int

    lineSpacing

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

    Declaration
    public float lineSpacing { get; set; }
    Property Value
    Type Description
    float

    lineSpacingAdjustment

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

    Declaration
    public float lineSpacingAdjustment { get; set; }
    Property Value
    Type Description
    float

    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
    Type Description
    TMP_Text

    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
    Type Description
    float

    margin

    The margins of the text object.

    Declaration
    public virtual Vector4 margin { get; set; }
    Property Value
    Type Description
    Vector4

    maxHeight

    Declaration
    public float maxHeight { get; }
    Property Value
    Type Description
    float

    maxVisibleCharacters

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

    Declaration
    public int maxVisibleCharacters { get; set; }
    Property Value
    Type Description
    int

    maxVisibleLines

    Allows control over how many lines of text are displayed.

    Declaration
    public int maxVisibleLines { get; set; }
    Property Value
    Type Description
    int

    maxVisibleWords

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

    Declaration
    public int maxVisibleWords { get; set; }
    Property Value
    Type Description
    int

    maxWidth

    Declaration
    public float maxWidth { get; }
    Property Value
    Type Description
    float

    mesh

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

    Declaration
    public virtual Mesh mesh { get; }
    Property Value
    Type Description
    Mesh

    minHeight

    Declaration
    public float minHeight { get; }
    Property Value
    Type Description
    float

    minWidth

    Declaration
    public float minWidth { get; }
    Property Value
    Type Description
    float

    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
    Type Description
    Color32

    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
    Type Description
    float

    overflowMode

    Controls the Text Overflow Mode

    Declaration
    public TextOverflowModes overflowMode { get; set; }
    Property Value
    Type Description
    TextOverflowModes

    overrideColorTags

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

    Declaration
    public bool overrideColorTags { get; set; }
    Property Value
    Type Description
    bool

    pageToDisplay

    Controls which page of text is shown

    Declaration
    public int pageToDisplay { get; set; }
    Property Value
    Type Description
    int

    paragraphSpacing

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

    Declaration
    public float paragraphSpacing { get; set; }
    Property Value
    Type Description
    float

    parseCtrlCharacters

    Enables or Disables parsing of CTRL characters in input text.

    Declaration
    public bool parseCtrlCharacters { get; set; }
    Property Value
    Type Description
    bool

    pixelsPerUnit

    Declaration
    public float pixelsPerUnit { get; }
    Property Value
    Type Description
    float

    preferredHeight

    Computed preferred height of the text object.

    Declaration
    public virtual float preferredHeight { get; }
    Property Value
    Type Description
    float

    preferredWidth

    Computed preferred width of the text object.

    Declaration
    public virtual float preferredWidth { get; }
    Property Value
    Type Description
    float

    rectTransform

    Returns are reference to the RectTransform

    Declaration
    public RectTransform rectTransform { get; }
    Property Value
    Type Description
    RectTransform

    renderMode

    Determines if the Mesh will be rendered.

    Declaration
    public TextRenderFlags renderMode { get; set; }
    Property Value
    Type Description
    TextRenderFlags

    renderedHeight

    Compute the rendered height of the text object.

    Declaration
    public virtual float renderedHeight { get; }
    Property Value
    Type Description
    float

    renderedWidth

    Compute the rendered width of the text object.

    Declaration
    public virtual float renderedWidth { get; }
    Property Value
    Type Description
    float

    richText

    Enables or Disables Rich Text Tags

    Declaration
    public bool richText { get; set; }
    Property Value
    Type Description
    bool

    spriteAnimator

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

    Declaration
    protected TMP_SpriteAnimator spriteAnimator { get; }
    Property Value
    Type Description
    TMP_SpriteAnimator

    spriteAsset

    Sprite Asset used by the text object.

    Declaration
    public TMP_SpriteAsset spriteAsset { get; set; }
    Property Value
    Type Description
    TMP_SpriteAsset

    styleSheet

    Style sheet used by the text object.

    Declaration
    public TMP_StyleSheet styleSheet { get; set; }
    Property Value
    Type Description
    TMP_StyleSheet

    text

    A string containing the text to be displayed.

    Declaration
    public virtual string text { get; set; }
    Property Value
    Type Description
    string

    textBounds

    Returns the bounds of the text of the text object.

    Declaration
    public Bounds textBounds { get; }
    Property Value
    Type Description
    Bounds

    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
    Type Description
    TMP_TextInfo

    textPreprocessor

    The ITextPreprocessor component referenced by the text object (if any)

    Declaration
    public ITextPreprocessor textPreprocessor { get; set; }
    Property Value
    Type Description
    ITextPreprocessor

    textStyle

    Declaration
    public TMP_Style textStyle { get; set; }
    Property Value
    Type Description
    TMP_Style

    textWrappingMode

    Controls the text wrapping mode.

    Declaration
    public TextWrappingModes textWrappingMode { get; set; }
    Property Value
    Type Description
    TextWrappingModes

    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
    Type Description
    bool

    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
    Type Description
    bool

    vertexBufferAutoSizeReduction

    Determines if the data structures allocated to contain the geometry of the text object will be reduced in size if the number of characters required to display the text is reduced by more than 256 characters. This reduction has the benefit of reducing the amount of vertex data being submitted to the graphic device but results in GC when it occurs.

    Declaration
    public bool vertexBufferAutoSizeReduction { get; set; }
    Property Value
    Type Description
    bool

    verticalAlignment

    Vertical alignment options

    Declaration
    public VerticalAlignmentOptions verticalAlignment { get; set; }
    Property Value
    Type Description
    VerticalAlignmentOptions

    verticalMapping

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

    Declaration
    public TextureMappingOptions verticalMapping { get; set; }
    Property Value
    Type Description
    TextureMappingOptions

    wordSpacing

    The amount of additional spacing between words.

    Declaration
    public float wordSpacing { get; set; }
    Property Value
    Type Description
    float

    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
    Type Description
    float

    Methods

    AdjustLineOffset(int, int, float)

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

    Declaration
    protected void AdjustLineOffset(int startIndex, int endIndex, float offset)
    Parameters
    Type Name Description
    int startIndex
    int endIndex
    float offset

    CalculatePreferredValues(ref float, Vector2, bool, TextWrappingModes)

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

    Declaration
    protected virtual Vector2 CalculatePreferredValues(ref float fontSize, Vector2 marginSize, bool isTextAutoSizingEnabled, TextWrappingModes textWrapMode)
    Parameters
    Type Name Description
    float fontSize
    Vector2 marginSize
    bool isTextAutoSizingEnabled
    TextWrappingModes textWrapMode
    Returns
    Type Description
    Vector2

    ClearMesh()

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

    Declaration
    public virtual void ClearMesh()

    ClearMesh(bool)

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

    Declaration
    public virtual void ClearMesh(bool uploadGeometry)
    Parameters
    Type Name Description
    bool uploadGeometry

    ComputeMarginSize()

    Function to force an update of the margin size.

    Declaration
    public virtual void ComputeMarginSize()

    ConvertToFloat(char[], int, int)

    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
    Type Name Description
    char[] chars
    int startIndex
    int length
    Returns
    Type Description
    float

    ConvertToFloat(char[], int, int, out int)

    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
    Type Name Description
    char[] chars
    int startIndex
    int length
    int lastIndex
    Returns
    Type Description
    float

    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(float, float, bool)

    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
    float alpha

    Target alpha.

    float duration

    Duration of the tween in seconds.

    bool ignoreTimeScale

    Should ignore Time.scale?

    Overrides
    Graphic.CrossFadeAlpha(float, float, bool)

    CrossFadeColor(Color, float, bool, bool)

    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.

    float duration

    Tween duration.

    bool ignoreTimeScale

    Should ignore Time.scale?

    bool useAlpha

    Should also Tween the alpha channel?

    Overrides
    Graphic.CrossFadeColor(Color, float, bool, bool)

    DestroySubMeshObjects()

    Destroy Sub Mesh Objects.

    Declaration
    protected virtual void DestroySubMeshObjects()

    DoMissingGlyphCallback(int, int, TMP_FontAsset)

    Declaration
    protected void DoMissingGlyphCallback(int unicode, int stringIndex, TMP_FontAsset fontAsset)
    Parameters
    Type Name Description
    int unicode
    int stringIndex
    TMP_FontAsset fontAsset

    DrawTextHighlight(Vector3, Vector3, ref int, Color32)

    Declaration
    protected virtual void DrawTextHighlight(Vector3 start, Vector3 end, ref int index, Color32 highlightColor)
    Parameters
    Type Name Description
    Vector3 start
    Vector3 end
    int index
    Color32 highlightColor

    DrawUnderlineMesh(Vector3, Vector3, ref int, float, float, float, float, 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
    int index
    float startScale
    float endScale
    float maxScale
    float sdfScale
    Color32 underlineColor

    FillCharacterVertexBuffers(int)

    Store vertex attributes into the appropriate TMP_MeshInfo.

    Declaration
    protected virtual void FillCharacterVertexBuffers(int i)
    Parameters
    Type Name Description
    int i

    FillCharacterVertexBuffers(int, bool)

    Declaration
    protected virtual void FillCharacterVertexBuffers(int i, bool isVolumetric)
    Parameters
    Type Name Description
    int i
    bool isVolumetric

    FillSpriteVertexBuffers(int)

    Fill Vertex Buffers for Sprites

    Declaration
    protected virtual void FillSpriteVertexBuffers(int i)
    Parameters
    Type Name Description
    int i

    ForceMeshUpdate(bool, bool)

    Function to force regeneration of the text object before its normal process time. This is useful when changes to the text object properties need to be applied immediately.

    Declaration
    public virtual void ForceMeshUpdate(bool ignoreActiveState = false, bool forceTextReparsing = false)
    Parameters
    Type Name Description
    bool ignoreActiveState

    Ignore Active State of text objects. Inactive objects are ignored by default.

    bool forceTextReparsing

    Force re-parsing of the text.

    GetCompoundBounds()

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

    Declaration
    protected virtual Bounds GetCompoundBounds()
    Returns
    Type Description
    Bounds

    GetEllipsisSpecialCharacter(TMP_FontAsset)

    Declaration
    protected void GetEllipsisSpecialCharacter(TMP_FontAsset fontAsset)
    Parameters
    Type Name Description
    TMP_FontAsset fontAsset

    GetFontAssetForWeight(int)

    Declaration
    protected TMP_FontAsset GetFontAssetForWeight(int fontWeight)
    Parameters
    Type Name Description
    int fontWeight
    Returns
    Type Description
    TMP_FontAsset

    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
    Type Description
    float

    GetPaddingForMaterial(Material)

    Get the padding value for the given material

    Declaration
    protected virtual float GetPaddingForMaterial(Material mat)
    Parameters
    Type Name Description
    Material mat
    Returns
    Type Description
    float

    GetParsedText()

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

    Declaration
    public virtual string GetParsedText()
    Returns
    Type Description
    string

    GetPreferredHeight()

    Method to calculate the preferred height of a text object.

    Declaration
    protected float GetPreferredHeight()
    Returns
    Type Description
    float

    GetPreferredValues()

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

    Declaration
    public Vector2 GetPreferredValues()
    Returns
    Type Description
    Vector2

    GetPreferredValues(float, float)

    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
    Type Name Description
    float width
    float height
    Returns
    Type Description
    Vector2

    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
    Type Description
    Vector2

    GetPreferredValues(string, float, float)

    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
    Type Name Description
    string text
    float width
    float height
    Returns
    Type Description
    Vector2

    GetPreferredWidth()

    Method to calculate the preferred width of a text object.

    Declaration
    protected float GetPreferredWidth()
    Returns
    Type Description
    float

    GetRenderedHeight(bool)

    Method returning the rendered height of the text object.

    Declaration
    protected float GetRenderedHeight(bool onlyVisibleCharacters)
    Parameters
    Type Name Description
    bool onlyVisibleCharacters
    Returns
    Type Description
    float

    GetRenderedValues()

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

    Declaration
    public Vector2 GetRenderedValues()
    Returns
    Type Description
    Vector2

    GetRenderedValues(bool)

    Declaration
    public Vector2 GetRenderedValues(bool onlyVisibleCharacters)
    Parameters
    Type Name Description
    bool onlyVisibleCharacters

    Should returned value only factor in visible characters and exclude those greater than maxVisibleCharacters for instance.

    Returns
    Type Description
    Vector2

    GetRenderedWidth(bool)

    Method returning the rendered width of the text object.

    Declaration
    protected float GetRenderedWidth(bool onlyVisibleCharacters)
    Parameters
    Type Name Description
    bool onlyVisibleCharacters
    Returns
    Type Description
    float

    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
    Type Name Description
    TMP_FontAsset fontAsset

    GetTextBounds()

    Method which returns the bounds of the text object;

    Declaration
    protected Bounds GetTextBounds()
    Returns
    Type Description
    Bounds

    GetTextBounds(bool)

    Method which returns the bounds of the text object;

    Declaration
    protected Bounds GetTextBounds(bool onlyVisibleCharacters)
    Parameters
    Type Name Description
    bool onlyVisibleCharacters
    Returns
    Type Description
    Bounds

    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
    Type Description
    TMP_TextInfo

    GetUnderlineSpecialCharacter(TMP_FontAsset)

    Declaration
    protected void GetUnderlineSpecialCharacter(TMP_FontAsset fontAsset)
    Parameters
    Type Name Description
    TMP_FontAsset fontAsset

    HexCharsToColor(char[], int)

    Method to convert Hex color values to Color32

    Declaration
    protected Color32 HexCharsToColor(char[] hexChars, int tagCount)
    Parameters
    Type Name Description
    char[] hexChars
    int tagCount
    Returns
    Type Description
    Color32

    HexCharsToColor(char[], int, int)

    Method to convert Hex Color values to Color32

    Declaration
    protected Color32 HexCharsToColor(char[] hexChars, int startIndex, int length)
    Parameters
    Type Name Description
    char[] hexChars
    int startIndex
    int length
    Returns
    Type Description
    Color32

    HexToInt(char)

    Method to convert Hex to Int

    Declaration
    protected uint HexToInt(char hex)
    Parameters
    Type Name Description
    char hex
    Returns
    Type Description
    uint

    InternalCrossFadeAlpha(float, float, bool)

    Declaration
    protected virtual void InternalCrossFadeAlpha(float alpha, float duration, bool ignoreTimeScale)
    Parameters
    Type Name Description
    float alpha
    float duration
    bool ignoreTimeScale

    InternalCrossFadeColor(Color, float, bool, bool)

    Declaration
    protected virtual void InternalCrossFadeColor(Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha)
    Parameters
    Type Name Description
    Color targetColor
    float duration
    bool ignoreTimeScale
    bool useAlpha

    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(float, float)

    Declaration
    protected float PackUV(float x, float y)
    Parameters
    Type Name Description
    float x
    float y
    Returns
    Type Description
    float

    PackUV(float, float, float)

    Function to pack scale information in the UV2 Channel.

    Declaration
    protected Vector2 PackUV(float x, float y, float scale)
    Parameters
    Type Name Description
    float x
    float y
    float scale
    Returns
    Type Description
    Vector2

    ParseInputText()

    Method to parse the input text based on its source

    Declaration
    protected void ParseInputText()

    ReplaceTagWithCharacter(int[], int, int, 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
    int[] chars

    Array which contains the text.

    int insertionIndex

    The index of where the new character will be inserted

    int tagLength

    Length of the tag being replaced.

    char c

    The replacement character.

    ResizeLineExtents(int)

    Function to increase the size of the Line Extents Array.

    Declaration
    protected void ResizeLineExtents(int size)
    Parameters
    Type Name Description
    int size

    SaveGlyphVertexInfo(float, float, Color32)

    Store vertex information for each character.

    Declaration
    protected virtual void SaveGlyphVertexInfo(float padding, float style_padding, Color32 vertexColor)
    Parameters
    Type Name Description
    float padding
    float 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

    SetActiveSubMeshes(bool)

    Method to Enable or Disable child SubMesh objects.

    Declaration
    protected virtual void SetActiveSubMeshes(bool state)
    Parameters
    Type Name Description
    bool state

    SetCharArray(char[])

    Set the text using a char array.

    Declaration
    public void SetCharArray(char[] sourceText)
    Parameters
    Type Name Description
    char[] sourceText

    Source char array containing the Unicode characters of the text.

    SetCharArray(char[], int, int)

    Set the text using a char array and specifying the starting character index and length.

    Declaration
    public void SetCharArray(char[] sourceText, int start, int length)
    Parameters
    Type Name Description
    char[] sourceText

    Source char array containing the Unicode characters of the text.

    int start

    The index of the first character to read from in the array.

    int length

    The number of characters in the array to be read.

    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(float)

    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
    float 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(char[])

    Set the text using a char array.

    Declaration
    public void SetText(char[] sourceText)
    Parameters
    Type Name Description
    char[] sourceText

    Source char array containing the Unicode characters of the text.

    SetText(char[], int, int)

    Set the text using a char array and specifying the starting character index and length.

    Declaration
    public void SetText(char[] sourceText, int start, int length)
    Parameters
    Type Name Description
    char[] sourceText

    Source char array containing the Unicode characters of the text.

    int start

    Index of the first character to read from in the array.

    int length

    The number of characters in the array to be read.

    SetText(string)

    This function is the same as using the text property to set the text.

    Declaration
    public void SetText(string sourceText)
    Parameters
    Type Name Description
    string sourceText

    String containing the text.

    SetText(string, bool)

    This function is the same as using the text property to set the text.

    Declaration
    [Obsolete("Use the SetText(string) function instead.")]
    public void SetText(string sourceText, bool syncTextInputBox = true)
    Parameters
    Type Name Description
    string sourceText

    String containing the text.

    bool syncTextInputBox

    This optional parameter no longer provides any functionality as this function now simple sets the .text property which is reflected in the Text Input Box.

    SetText(string, float)

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

    Ex. TMP_Text.SetText("A = {0}, B = {1:00}, C = {2:000.0}", 10.75f, 10.75f, 10.75f);

    Results "A = 10.75, B = 11, C = 010.8."

    Declaration
    public void SetText(string sourceText, float arg0)
    Parameters
    Type Name Description
    string sourceText

    String containing the pattern.

    float arg0

    First float value.

    SetText(string, float, float)

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

    Ex. TMP_Text.SetText("A = {0}, B = {1:00}, C = {2:000.0}", 10.75f, 10.75f, 10.75f);

    Results "A = 10.75, B = 11, C = 010.8."

    Declaration
    public void SetText(string sourceText, float arg0, float arg1)
    Parameters
    Type Name Description
    string sourceText

    String containing the pattern.

    float arg0

    First float value.

    float arg1

    Second float value.

    SetText(string, float, float, float)

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

    Ex. TMP_Text.SetText("A = {0}, B = {1:00}, C = {2:000.0}", 10.75f, 10.75f, 10.75f);

    Results "A = 10.75, B = 11, C = 010.8."

    Declaration
    public void SetText(string sourceText, float arg0, float arg1, float arg2)
    Parameters
    Type Name Description
    string sourceText

    String containing the pattern.

    float arg0

    First float value.

    float arg1

    Second float value.

    float arg2

    Third float value.

    SetText(string, float, float, float, float)

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

    Ex. TMP_Text.SetText("A = {0}, B = {1:00}, C = {2:000.0}", 10.75f, 10.75f, 10.75f);

    Results "A = 10.75, B = 11, C = 010.8."

    Declaration
    public void SetText(string sourceText, float arg0, float arg1, float arg2, float arg3)
    Parameters
    Type Name Description
    string sourceText

    String containing the pattern.

    float arg0

    First float value.

    float arg1

    Second float value.

    float arg2

    Third float value.

    float arg3

    Forth float value.

    SetText(string, float, float, float, float, float)

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

    Ex. TMP_Text.SetText("A = {0}, B = {1:00}, C = {2:000.0}", 10.75f, 10.75f, 10.75f);

    Results "A = 10.75, B = 11, C = 010.8."

    Declaration
    public void SetText(string sourceText, float arg0, float arg1, float arg2, float arg3, float arg4)
    Parameters
    Type Name Description
    string sourceText

    String containing the pattern.

    float arg0

    First float value.

    float arg1

    Second float value.

    float arg2

    Third float value.

    float arg3

    Forth float value.

    float arg4

    Fifth float value.

    SetText(string, float, float, float, float, float, float)

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

    Ex. TMP_Text.SetText("A = {0}, B = {1:00}, C = {2:000.0}", 10.75f, 10.75f, 10.75f);

    Results "A = 10.75, B = 11, C = 010.8."

    Declaration
    public void SetText(string sourceText, float arg0, float arg1, float arg2, float arg3, float arg4, float arg5)
    Parameters
    Type Name Description
    string sourceText

    String containing the pattern.

    float arg0

    First float value.

    float arg1

    Second float value.

    float arg2

    Third float value.

    float arg3

    Forth float value.

    float arg4

    Fifth float value.

    float arg5

    Sixth float value.

    SetText(string, float, float, float, float, float, float, float)

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

    Ex. TMP_Text.SetText("A = {0}, B = {1:00}, C = {2:000.0}", 10.75f, 10.75f, 10.75f);

    Results "A = 10.75, B = 11, C = 010.8."

    Declaration
    public void SetText(string sourceText, float arg0, float arg1, float arg2, float arg3, float arg4, float arg5, float arg6)
    Parameters
    Type Name Description
    string sourceText

    String containing the pattern.

    float arg0

    First float value.

    float arg1

    Second float value.

    float arg2

    Third float value.

    float arg3

    Forth float value.

    float arg4

    Fifth float value.

    float arg5

    Sixth float value.

    float arg6

    Seventh float value.

    SetText(string, float, float, float, float, float, float, float, float)

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

    Ex. TMP_Text.SetText("A = {0}, B = {1:00}, C = {2:000.0}", 10.75f, 10.75f, 10.75f);

    Results "A = 10.75, B = 11, C = 010.8."

    Declaration
    public void SetText(string sourceText, float arg0, float arg1, float arg2, float arg3, float arg4, float arg5, float arg6, float arg7)
    Parameters
    Type Name Description
    string sourceText

    String containing the pattern.

    float arg0

    First float value.

    float arg1

    Second float value.

    float arg2

    Third float value.

    float arg3

    Forth float value.

    float arg4

    Fifth float value.

    float arg5

    Sixth float value.

    float arg6

    Seventh float value.

    float arg7

    Eighth float value.

    SetText(StringBuilder)

    Set the text using a StringBuilder object as the source.

    Declaration
    public void SetText(StringBuilder sourceText)
    Parameters
    Type Name Description
    StringBuilder sourceText

    The StringBuilder object containing the source text.

    SetTextSortingOrder(int[])

    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
    int[] order

    SetTextSortingOrder(VertexSortingOrder)

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

    Declaration
    protected void SetTextSortingOrder(VertexSortingOrder order)
    Parameters
    Type Name Description
    VertexSortingOrder order

    SetVertexColorGradient(TMP_ColorGradient)

    Declaration
    protected void SetVertexColorGradient(TMP_ColorGradient gradient)
    Parameters
    Type Name Description
    TMP_ColorGradient gradient

    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

    UpdateGeometry(Mesh, int)

    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
    int 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
    Type Name Description
    TMP_VertexDataUpdateFlags flags

    Events

    OnFontAssetRequest

    Declaration
    public static event Func<int, string, TMP_FontAsset> OnFontAssetRequest
    Event Type
    Type Description
    Func<int, string, TMP_FontAsset>

    OnMissingCharacter

    Event delegate to be called when the requested Unicode character is missing from the font asset.

    Declaration
    public static event TMP_Text.MissingCharacterEventCallback OnMissingCharacter
    Event Type
    Type Description
    TMP_Text.MissingCharacterEventCallback

    OnPreRenderText

    Event delegate to allow modifying the text geometry before it is uploaded to the mesh and rendered.

    Declaration
    public virtual event Action<TMP_TextInfo> OnPreRenderText
    Event Type
    Type Description
    Action<TMP_TextInfo>

    OnSpriteAssetRequest

    Declaration
    public static event Func<int, string, TMP_SpriteAsset> OnSpriteAssetRequest
    Event Type
    Type Description
    Func<int, string, TMP_SpriteAsset>

    Implements

    ICanvasElement
    IClippable
    IMaskable
    IMaterialModifier
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)