Class TMP_SpriteGlyph
The visual representation of the sprite character using this glyph.
Inherited Members
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 |
---|---|---|
UInt32 | 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. |
Single | scale | Scale of the glyph. |
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 |
---|---|---|
UInt32 | index |
|
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. |
Single | scale | Scale of the glyph. |
Int32 | 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 |