docs.unity3d.com
    Show / Hide Table of Contents

    Class TMP_SpriteGlyph

    The visual representation of the sprite character using this glyph.

    Inheritance
    System.Object
    UnityEngine.TextCore.Glyph
    TMP_SpriteGlyph
    Inherited Members
    UnityEngine.TextCore.Glyph.Compare(UnityEngine.TextCore.Glyph)
    UnityEngine.TextCore.Glyph.index
    UnityEngine.TextCore.Glyph.metrics
    UnityEngine.TextCore.Glyph.glyphRect
    UnityEngine.TextCore.Glyph.scale
    UnityEngine.TextCore.Glyph.atlasIndex
    UnityEngine.TextCore.Glyph.classDefinitionType
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: TMPro
    Syntax
    [Serializable]
    public class TMP_SpriteGlyph : Glyph

    Constructors

    TMP_SpriteGlyph()

    Declaration
    public TMP_SpriteGlyph()

    TMP_SpriteGlyph(UInt32, GlyphMetrics, GlyphRect, Single, Int32)

    Constructor for new sprite glyph.

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

    Index of the sprite glyph.

    UnityEngine.TextCore.GlyphMetrics metrics

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

    UnityEngine.TextCore.GlyphRect glyphRect

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

    System.Single scale

    Scale of the glyph.

    System.Int32 atlasIndex

    Index of the atlas texture that contains the glyph.

    TMP_SpriteGlyph(UInt32, GlyphMetrics, GlyphRect, Single, Int32, 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
    System.UInt32 index

    Index of the sprite glyph.

    UnityEngine.TextCore.GlyphMetrics metrics

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

    UnityEngine.TextCore.GlyphRect glyphRect

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

    System.Single scale

    Scale of the glyph.

    System.Int32 atlasIndex

    Index of the atlas texture that contains the glyph.

    UnityEngine.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
    UnityEngine.Sprite
    Back to top
    Copyright © 2025 Unity Technologies
    • 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 02 April 2025