diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-04-19 17:19:32 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-04-19 17:19:32 -0400 |
| commit | c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 (patch) | |
| tree | ee4d51c7c1d633e11f46453ef1edd3c77c4ef9f7 /Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs | |
| download | Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.gz Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.bz2 Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.zip | |
Inital commit
Diffstat (limited to 'Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs')
| -rw-r--r-- | Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs new file mode 100644 index 0000000..0c29264 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs @@ -0,0 +1,51 @@ +using System;
+using UnityEngine.TextCore;
+
+namespace TMPro
+{
+ /// <summary>
+ /// A basic element of text.
+ /// </summary>
+ [Serializable]
+ public class TMP_Character : TMP_TextElement
+ {
+ /// <summary>
+ /// Default constructor.
+ /// </summary>
+ public TMP_Character()
+ {
+ m_ElementType = TextElementType.Character;
+ this.scale = 1.0f;
+ }
+
+ /// <summary>
+ /// Constructor for new character
+ /// </summary>
+ /// <param name="unicode">Unicode value.</param>
+ /// <param name="glyph">Glyph</param>
+ 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;
+ }
+
+ /// <summary>
+ /// Constructor for new character
+ /// </summary>
+ /// <param name="unicode">Unicode value.</param>
+ /// <param name="glyphIndex">Glyph index.</param>
+ internal TMP_Character(uint unicode, uint glyphIndex)
+ {
+ m_ElementType = TextElementType.Character;
+
+ this.unicode = unicode;
+ this.glyph = null;
+ this.glyphIndex = glyphIndex;
+ this.scale = 1.0f;
+ }
+ }
+}
|
