docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TMP_SpriteGlyph

    The visual representation of the sprite character using this glyph.

    Inheritance
    object
    Glyph
    TMP_SpriteGlyph
    Inherited Members
    Glyph.Compare(Glyph)
    Glyph.index
    Glyph.metrics
    Glyph.glyphRect
    Glyph.scale
    Glyph.atlasIndex
    Glyph.classDefinitionType
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TMPro
    Assembly: Unity.TextMeshPro.dll
    Syntax
    [Serializable]
    public class TMP_SpriteGlyph : Glyph

    Constructors

    TMP_SpriteGlyph()

    Declaration
    public TMP_SpriteGlyph()

    TMP_SpriteGlyph(uint, GlyphMetrics, GlyphRect, float, int)

    Constructor for new sprite glyph.

    Declaration
    public TMP_SpriteGlyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect, float scale, int atlasIndex)
    Parameters
    Type Name Description
    uint index

    Index of the sprite glyph.

    GlyphMetrics metrics

    Metrics which define the position of the glyph in the context of text layout.

    GlyphRect glyphRect

    GlyphRect which defines the coordinates of the glyph in the atlas texture.

    float scale

    Scale of the glyph.

    int atlasIndex

    Index of the atlas texture that contains the glyph.

    TMP_SpriteGlyph(uint, GlyphMetrics, GlyphRect, float, int, Sprite)

    Constructor for new sprite glyph.

    Declaration
    public TMP_SpriteGlyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect, float scale, int atlasIndex, Sprite sprite)
    Parameters
    Type Name Description
    uint index

    Index of the sprite glyph.

    GlyphMetrics metrics

    Metrics which define the position of the glyph in the context of text layout.

    GlyphRect glyphRect

    GlyphRect which defines the coordinates of the glyph in the atlas texture.

    float scale

    Scale of the glyph.

    int atlasIndex

    Index of the atlas texture that contains the glyph.

    Sprite sprite

    A reference to the Unity Sprite representing this sprite glyph.

    Fields

    sprite

    An optional reference to the underlying sprite used to create this glyph.

    Declaration
    public Sprite sprite
    Field Value
    Type Description
    Sprite
    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)