docs.unity3d.com
    Show / Hide Table of Contents

    Class TMP_SubMeshUI

    Inheritance
    Object
    UIBehaviour
    Graphic
    MaskableGraphic
    TMP_SubMeshUI
    Inherited Members
    MaskableGraphic.m_ShouldRecalculateStencil
    MaskableGraphic.m_MaskMaterial
    MaskableGraphic.m_IncludeForMasking
    MaskableGraphic.m_ShouldRecalculate
    MaskableGraphic.m_StencilValue
    MaskableGraphic.SetClipRect(Rect, Boolean)
    UnityEngine.UI.MaskableGraphic.OnValidate()
    MaskableGraphic.ParentMaskStateChanged()
    MaskableGraphic.OnCanvasHierarchyChanged()
    UnityEngine.UI.MaskableGraphic.UnityEngine.UI.IClippable.get_gameObject()
    MaskableGraphic.onCullStateChanged
    MaskableGraphic.maskable
    MaskableGraphic.isMaskingGraphic
    Graphic.s_DefaultUI
    Graphic.s_WhiteTexture
    Graphic.m_Material
    Graphic.m_SkipLayoutUpdate
    Graphic.m_SkipMaterialUpdate
    Graphic.m_OnDirtyLayoutCallback
    Graphic.m_OnDirtyVertsCallback
    Graphic.m_OnDirtyMaterialCallback
    Graphic.s_Mesh
    Graphic.m_CachedMesh
    Graphic.m_CachedUvs
    Graphic.OnRectTransformDimensionsChange()
    Graphic.OnBeforeTransformParentChanged()
    Graphic.OnCullingChanged()
    Graphic.LayoutComplete()
    Graphic.GraphicUpdateComplete()
    Graphic.OnFillVBO(List<UIVertex>)
    Graphic.OnPopulateMesh(Mesh)
    Graphic.OnPopulateMesh(VertexHelper)
    UnityEngine.UI.Graphic.OnRebuildRequested()
    UnityEngine.UI.Graphic.Reset()
    Graphic.OnDidApplyAnimationProperties()
    Graphic.SetNativeSize()
    Graphic.Raycast(Vector2, Camera)
    Graphic.PixelAdjustPoint(Vector2)
    Graphic.GetPixelAdjustedRect()
    Graphic.CrossFadeColor(Color, Single, Boolean, Boolean)
    Graphic.CrossFadeColor(Color, Single, Boolean, Boolean, Boolean)
    Graphic.CrossFadeAlpha(Single, Single, Boolean)
    Graphic.RegisterDirtyLayoutCallback(UnityAction)
    Graphic.UnregisterDirtyLayoutCallback(UnityAction)
    Graphic.RegisterDirtyVerticesCallback(UnityAction)
    Graphic.UnregisterDirtyVerticesCallback(UnityAction)
    Graphic.RegisterDirtyMaterialCallback(UnityAction)
    Graphic.UnregisterDirtyMaterialCallback(UnityAction)
    UnityEngine.UI.Graphic.UnityEngine.UI.ICanvasElement.get_transform()
    Graphic.defaultGraphicMaterial
    Graphic.color
    Graphic.raycastTarget
    Graphic.useLegacyMeshGeneration
    Graphic.depth
    Graphic.rectTransform
    Graphic.canvas
    Graphic.defaultMaterial
    Graphic.workerMesh
    UIBehaviour.Awake()
    UIBehaviour.Start()
    UIBehaviour.IsActive()
    UIBehaviour.OnCanvasGroupChanged()
    UIBehaviour.IsDestroyed()
    Namespace: TMPro
    Syntax
    [ExecuteAlways]
    public class TMP_SubMeshUI : MaskableGraphic, ICanvasElement, IClippable, IMaskable, IMaterialModifier

    Properties

    canvasRenderer

    The Mesh Renderer of this text sub object.

    Declaration
    public CanvasRenderer canvasRenderer { get; }
    Property Value
    Type Description
    CanvasRenderer

    fallbackMaterial

    Declaration
    public Material fallbackMaterial { get; set; }
    Property Value
    Type Description
    Material

    fallbackSourceMaterial

    The source material used by the fallback font

    Declaration
    public Material fallbackSourceMaterial { get; set; }
    Property Value
    Type Description
    Material

    fontAsset

    The TMP Font Asset assigned to this sub text object.

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

    isDefaultMaterial

    Is the text object using the default font asset material.

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

    mainTexture

    Declaration
    public override Texture mainTexture { get; }
    Property Value
    Type Description
    Texture
    Overrides
    Graphic.mainTexture

    material

    The material to be assigned to this object. Returns an instance of the material.

    Declaration
    public override Material material { get; set; }
    Property Value
    Type Description
    Material
    Overrides
    Graphic.material

    materialForRendering

    Get the material that will be used for rendering.

    Declaration
    public override Material materialForRendering { get; }
    Property Value
    Type Description
    Material
    Overrides
    Graphic.materialForRendering

    mesh

    The Mesh of this text sub object.

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

    padding

    Padding value resulting for the property settings on the material.

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

    sharedMaterial

    The material to be assigned to this text object.

    Declaration
    public Material sharedMaterial { get; set; }
    Property Value
    Type Description
    Material

    spriteAsset

    The TMP Sprite Asset assigned to this sub text object.

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

    Methods

    AddSubTextObject(TextMeshProUGUI, MaterialReference)

    Function to add a new sub text object.

    Declaration
    public static TMP_SubMeshUI AddSubTextObject(TextMeshProUGUI textComponent, MaterialReference materialReference)
    Parameters
    Type Name Description
    TextMeshProUGUI textComponent
    MaterialReference materialReference
    Returns
    Type Description
    TMP_SubMeshUI

    Cull(Rect, Boolean)

    Override to Cull function of MaskableGraphic to prevent Culling.

    Declaration
    public override void Cull(Rect clipRect, bool validRect)
    Parameters
    Type Name Description
    Rect clipRect
    Boolean validRect

    GetModifiedMaterial(Material)

    Function returning the modified material for masking if necessary.

    Declaration
    public override Material GetModifiedMaterial(Material baseMaterial)
    Parameters
    Type Name Description
    Material baseMaterial
    Returns
    Type Description
    Material

    GetPaddingForMaterial()

    Function called when the padding value for the material needs to be re-calculated.

    Declaration
    public float GetPaddingForMaterial()
    Returns
    Type Description
    Single

    GetPaddingForMaterial(Material)

    Function called when the padding value for the material needs to be re-calculated.

    Declaration
    public float GetPaddingForMaterial(Material mat)
    Parameters
    Type Name Description
    Material mat
    Returns
    Type Description
    Single

    OnDestroy()

    Declaration
    protected override void OnDestroy()
    Overrides
    Graphic.OnDestroy()

    OnDisable()

    Declaration
    protected override void OnDisable()
    Overrides
    MaskableGraphic.OnDisable()

    OnEnable()

    Declaration
    protected override void OnEnable()
    Overrides
    MaskableGraphic.OnEnable()

    OnTransformParentChanged()

    Declaration
    protected override void OnTransformParentChanged()
    Overrides
    MaskableGraphic.OnTransformParentChanged()

    Rebuild(CanvasUpdate)

    Declaration
    public override void Rebuild(CanvasUpdate update)
    Parameters
    Type Name Description
    CanvasUpdate update
    Overrides
    Graphic.Rebuild(CanvasUpdate)

    RecalculateClipping()

    Method called when the state of a parent changes.

    Declaration
    public override void RecalculateClipping()
    Overrides
    MaskableGraphic.RecalculateClipping()
    Implements
    IClippable.RecalculateClipping()

    RecalculateMasking()

    Declaration
    public override void RecalculateMasking()
    Overrides
    MaskableGraphic.RecalculateMasking()
    Implements
    IMaskable.RecalculateMasking()

    RefreshMaterial()

    Function to update the material from the parent text object.

    Declaration
    public void RefreshMaterial()

    SetAllDirty()

    Declaration
    public override void SetAllDirty()
    Overrides
    Graphic.SetAllDirty()

    SetLayoutDirty()

    Declaration
    public override void SetLayoutDirty()
    Overrides
    Graphic.SetLayoutDirty()

    SetMaterialDirty()

    Declaration
    public override void SetMaterialDirty()
    Overrides
    Graphic.SetMaterialDirty()

    SetPivotDirty()

    Declaration
    public void SetPivotDirty()

    SetVerticesDirty()

    Declaration
    public override void SetVerticesDirty()
    Overrides
    Graphic.SetVerticesDirty()

    UpdateGeometry()

    Declaration
    protected override void UpdateGeometry()
    Overrides
    Graphic.UpdateGeometry()

    UpdateMaterial()

    Declaration
    protected override void UpdateMaterial()
    Overrides
    Graphic.UpdateMaterial()

    UpdateMeshPadding(Boolean, Boolean)

    Declaration
    public void UpdateMeshPadding(bool isExtraPadding, bool isUsingBold)
    Parameters
    Type Name Description
    Boolean isExtraPadding
    Boolean isUsingBold
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023