using System;
using UnityEngine.TextCore;
namespace TMPro
{
///
/// A basic element of text.
///
[Serializable]
public class TMP_Character : TMP_TextElement
{
///
/// Default constructor.
///
public TMP_Character()
{
m_ElementType = TextElementType.Character;
this.scale = 1.0f;
}
///
/// Constructor for new character
///
/// Unicode value.
/// Glyph
public TMP_Character(uint unicode, Glyph glyph)
{
m_ElementType = TextElementType.Character;
this.unicode = unicode;
this.glyph = glyph;
this.glyphIndex = glyph.index;
this.scale = 1.0f;
}
///
/// Constructor for new character
///
/// Unicode value.
/// Glyph index.
internal TMP_Character(uint unicode, uint glyphIndex)
{
m_ElementType = TextElementType.Character;
this.unicode = unicode;
this.glyph = null;
this.glyphIndex = glyphIndex;
this.scale = 1.0f;
}
}
}