From c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 19 Apr 2020 17:19:32 -0400 Subject: Inital commit --- .../Scripts/Runtime/AssemblyInfo.cs.cs | 11 + .../Scripts/Runtime/AssemblyInfo.cs.cs.meta | 11 + .../Scripts/Runtime/FastAction.cs | 146 + .../Scripts/Runtime/FastAction.cs.meta | 12 + .../Scripts/Runtime/MaterialReferenceManager.cs | 644 ++ .../Runtime/MaterialReferenceManager.cs.meta | 12 + .../Scripts/Runtime/TMP_Asset.cs | 26 + .../Scripts/Runtime/TMP_Asset.cs.meta | 12 + .../Scripts/Runtime/TMP_Character.cs | 51 + .../Scripts/Runtime/TMP_Character.cs.meta | 11 + .../Scripts/Runtime/TMP_CharacterInfo.cs | 73 + .../Scripts/Runtime/TMP_CharacterInfo.cs.meta | 11 + .../Scripts/Runtime/TMP_ColorGradient.cs | 68 + .../Scripts/Runtime/TMP_ColorGradient.cs.meta | 12 + .../Scripts/Runtime/TMP_CoroutineTween.cs | 246 + .../Scripts/Runtime/TMP_CoroutineTween.cs.meta | 12 + .../Scripts/Runtime/TMP_DefaultControls.cs | 385 + .../Scripts/Runtime/TMP_DefaultControls.cs.meta | 12 + .../Scripts/Runtime/TMP_Dropdown.cs | 1059 +++ .../Scripts/Runtime/TMP_Dropdown.cs.meta | 11 + .../Scripts/Runtime/TMP_EditorResourceManager.cs | 142 + .../Runtime/TMP_EditorResourceManager.cs.meta | 11 + .../Scripts/Runtime/TMP_FontAsset.cs | 1948 +++++ .../Scripts/Runtime/TMP_FontAsset.cs.meta | 11 + .../Scripts/Runtime/TMP_FontAssetCommon.cs | 456 ++ .../Scripts/Runtime/TMP_FontAssetCommon.cs.meta | 10 + .../Scripts/Runtime/TMP_FontAssetUtilities.cs | 360 + .../Scripts/Runtime/TMP_FontAssetUtilities.cs.meta | 11 + .../Scripts/Runtime/TMP_FontFeatureTable.cs | 55 + .../Scripts/Runtime/TMP_FontFeatureTable.cs.meta | 11 + .../Scripts/Runtime/TMP_FontFeaturesCommon.cs | 223 + .../Scripts/Runtime/TMP_FontFeaturesCommon.cs.meta | 11 + .../Scripts/Runtime/TMP_InputField.cs | 4149 +++++++++++ .../Scripts/Runtime/TMP_InputField.cs.meta | 11 + .../Scripts/Runtime/TMP_InputValidator.cs | 15 + .../Scripts/Runtime/TMP_InputValidator.cs.meta | 12 + .../Scripts/Runtime/TMP_LineInfo.cs | 52 + .../Scripts/Runtime/TMP_LineInfo.cs.meta | 12 + .../Scripts/Runtime/TMP_ListPool.cs | 21 + .../Scripts/Runtime/TMP_ListPool.cs.meta | 12 + .../Scripts/Runtime/TMP_MaterialManager.cs | 626 ++ .../Scripts/Runtime/TMP_MaterialManager.cs.meta | 10 + .../Scripts/Runtime/TMP_MeshInfo.cs | 668 ++ .../Scripts/Runtime/TMP_MeshInfo.cs.meta | 12 + .../Scripts/Runtime/TMP_ObjectPool.cs | 51 + .../Scripts/Runtime/TMP_ObjectPool.cs.meta | 12 + .../Scripts/Runtime/TMP_PackageResourceImporter.cs | 212 + .../Runtime/TMP_PackageResourceImporter.cs.meta | 16 + .../Scripts/Runtime/TMP_RichTextTagStack.cs | 278 + .../Scripts/Runtime/TMP_RichTextTagStack.cs.meta | 12 + .../Scripts/Runtime/TMP_RichTextTagsCommon.cs | 113 + .../Scripts/Runtime/TMP_RichTextTagsCommon.cs.meta | 11 + .../Scripts/Runtime/TMP_ScrollbarEventHandler.cs | 31 + .../Runtime/TMP_ScrollbarEventHandler.cs.meta | 12 + .../Scripts/Runtime/TMP_SelectionCaret.cs | 23 + .../Scripts/Runtime/TMP_SelectionCaret.cs.meta | 12 + .../Scripts/Runtime/TMP_Settings.cs | 440 ++ .../Scripts/Runtime/TMP_Settings.cs.meta | 12 + .../Scripts/Runtime/TMP_ShaderUtilities.cs | 563 ++ .../Scripts/Runtime/TMP_ShaderUtilities.cs.meta | 10 + .../Scripts/Runtime/TMP_Sprite.cs | 31 + .../Scripts/Runtime/TMP_Sprite.cs.meta | 10 + .../Scripts/Runtime/TMP_SpriteAnimator.cs | 147 + .../Scripts/Runtime/TMP_SpriteAnimator.cs.meta | 12 + .../Scripts/Runtime/TMP_SpriteAsset.cs | 503 ++ .../Scripts/Runtime/TMP_SpriteAsset.cs.meta | 11 + .../Runtime/TMP_SpriteAssetImportFormats.cs | 61 + .../Runtime/TMP_SpriteAssetImportFormats.cs.meta | 12 + .../Scripts/Runtime/TMP_SpriteCharacter.cs | 74 + .../Scripts/Runtime/TMP_SpriteCharacter.cs.meta | 11 + .../Scripts/Runtime/TMP_SpriteGlyph.cs | 61 + .../Scripts/Runtime/TMP_SpriteGlyph.cs.meta | 11 + .../Scripts/Runtime/TMP_Style.cs | 95 + .../Scripts/Runtime/TMP_Style.cs.meta | 12 + .../Scripts/Runtime/TMP_StyleSheet.cs | 131 + .../Scripts/Runtime/TMP_StyleSheet.cs.meta | 13 + .../Scripts/Runtime/TMP_SubMesh.cs | 580 ++ .../Scripts/Runtime/TMP_SubMesh.cs.meta | 12 + .../Scripts/Runtime/TMP_SubMeshUI.cs | 807 +++ .../Scripts/Runtime/TMP_SubMeshUI.cs.meta | 12 + .../Scripts/Runtime/TMP_Text.cs | 7594 ++++++++++++++++++++ .../Scripts/Runtime/TMP_Text.cs.meta | 12 + .../Scripts/Runtime/TMP_TextElement.cs | 62 + .../Scripts/Runtime/TMP_TextElement.cs.meta | 11 + .../Scripts/Runtime/TMP_TextElement_Legacy.cs | 25 + .../Scripts/Runtime/TMP_TextElement_Legacy.cs.meta | 12 + .../Scripts/Runtime/TMP_TextInfo.cs | 256 + .../Scripts/Runtime/TMP_TextInfo.cs.meta | 12 + .../Scripts/Runtime/TMP_TextParsingUtilities.cs | 136 + .../Runtime/TMP_TextParsingUtilities.cs.meta | 11 + .../Scripts/Runtime/TMP_TextUtilities.cs | 2279 ++++++ .../Scripts/Runtime/TMP_TextUtilities.cs.meta | 12 + .../Scripts/Runtime/TMP_UpdateManager.cs | 238 + .../Scripts/Runtime/TMP_UpdateManager.cs.meta | 12 + .../Scripts/Runtime/TMP_UpdateRegistery.cs | 178 + .../Scripts/Runtime/TMP_UpdateRegistery.cs.meta | 12 + .../Scripts/Runtime/TMPro_EventManager.cs | 150 + .../Scripts/Runtime/TMPro_EventManager.cs.meta | 10 + .../Scripts/Runtime/TMPro_ExtensionMethods.cs | 224 + .../Scripts/Runtime/TMPro_ExtensionMethods.cs.meta | 10 + .../Scripts/Runtime/TMPro_MeshUtilities.cs | 357 + .../Scripts/Runtime/TMPro_MeshUtilities.cs.meta | 10 + .../Scripts/Runtime/TMPro_Private.cs | 4051 +++++++++++ .../Scripts/Runtime/TMPro_Private.cs.meta | 10 + .../Scripts/Runtime/TMPro_UGUI_Private.cs | 4314 +++++++++++ .../Scripts/Runtime/TMPro_UGUI_Private.cs.meta | 10 + .../Scripts/Runtime/TextContainer.cs | 370 + .../Scripts/Runtime/TextContainer.cs.meta | 12 + .../Scripts/Runtime/TextMeshPro.cs | 551 ++ .../Scripts/Runtime/TextMeshPro.cs.meta | 39 + .../Scripts/Runtime/TextMeshProUGUI.cs | 656 ++ .../Scripts/Runtime/TextMeshProUGUI.cs.meta | 11 + .../Scripts/Runtime/Unity.TextMeshPro.asmdef | 13 + .../Scripts/Runtime/Unity.TextMeshPro.asmdef.meta | 7 + 114 files changed, 37755 insertions(+) create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_DefaultControls.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_DefaultControls.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Dropdown.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Dropdown.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_EditorResourceManager.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_EditorResourceManager.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAsset.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAssetCommon.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAssetCommon.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAssetUtilities.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAssetUtilities.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontFeatureTable.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontFeatureTable.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontFeaturesCommon.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontFeaturesCommon.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_InputField.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_InputField.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_InputValidator.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_InputValidator.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_LineInfo.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_LineInfo.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ListPool.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ListPool.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_MaterialManager.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_MaterialManager.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_MeshInfo.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_MeshInfo.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ObjectPool.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ObjectPool.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_PackageResourceImporter.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_PackageResourceImporter.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_RichTextTagStack.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_RichTextTagStack.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_RichTextTagsCommon.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_RichTextTagsCommon.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ScrollbarEventHandler.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ScrollbarEventHandler.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SelectionCaret.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SelectionCaret.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Settings.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Settings.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ShaderUtilities.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ShaderUtilities.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Sprite.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Sprite.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAnimator.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAnimator.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAsset.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteCharacter.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteCharacter.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteGlyph.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteGlyph.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Style.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Style.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_StyleSheet.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_StyleSheet.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SubMesh.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SubMesh.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SubMeshUI.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SubMeshUI.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Text.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Text.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextElement.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextElement.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextElement_Legacy.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextElement_Legacy.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextInfo.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextInfo.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextParsingUtilities.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextParsingUtilities.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextUtilities.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_TextUtilities.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_UpdateManager.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_UpdateManager.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_UpdateRegistery.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_UpdateRegistery.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_EventManager.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_EventManager.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_ExtensionMethods.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_ExtensionMethods.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_MeshUtilities.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_MeshUtilities.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_Private.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_Private.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_UGUI_Private.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_UGUI_Private.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TextContainer.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TextContainer.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TextMeshPro.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TextMeshPro.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TextMeshProUGUI.cs create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TextMeshProUGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/Unity.TextMeshPro.asmdef create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/Unity.TextMeshPro.asmdef.meta (limited to 'Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime') diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs new file mode 100644 index 0000000..472129d --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs @@ -0,0 +1,11 @@ +using System.Runtime.CompilerServices; + +// Allow internal visibility for testing purposes. +[assembly: InternalsVisibleTo("Unity.TextCore")] + +[assembly: InternalsVisibleTo("Unity.FontEngine.Tests")] + +#if UNITY_EDITOR +[assembly: InternalsVisibleTo("Unity.TextCore.Editor")] +[assembly: InternalsVisibleTo("Unity.TextMeshPro.Editor")] +#endif diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta new file mode 100644 index 0000000..b8b0156 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1c147d10db452eb4b854a35f84472017 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs new file mode 100644 index 0000000..15012e3 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs @@ -0,0 +1,146 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + public class FastAction + { + + LinkedList delegates = new LinkedList(); + + Dictionary> lookup = new Dictionary>(); + + public void Add(System.Action rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action rhs) + { + if (lookup.TryGetValue(rhs, out LinkedListNode node)) + { + lookup.Remove(rhs); + delegates.Remove(node); + } + } + + public void Call() + { + var node = delegates.First; + while (node != null) + { + node.Value(); + node = node.Next; + } + } + } + + + public class FastAction + { + + LinkedList> delegates = new LinkedList>(); + + Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); + + public void Add(System.Action rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action rhs) + { + if (lookup.TryGetValue(rhs, out LinkedListNode> node)) + { + lookup.Remove(rhs); + delegates.Remove(node); + } + } + + public void Call(A a) + { + var node = delegates.First; + while (node != null) + { + node.Value(a); + node = node.Next; + } + } + } + + + public class FastAction + { + + LinkedList> delegates = new LinkedList>(); + + Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); + + public void Add(System.Action rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action rhs) + { + if (lookup.TryGetValue(rhs, out LinkedListNode> node)) + { + lookup.Remove(rhs); + delegates.Remove(node); + } + } + + public void Call(A a, B b) + { + var node = delegates.First; + while (node != null) + { + node.Value(a, b); + node = node.Next; + } + } + } + + + public class FastAction + { + + LinkedList> delegates = new LinkedList>(); + + Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); + + public void Add(System.Action rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action rhs) + { + if (lookup.TryGetValue(rhs, out LinkedListNode> node)) + { + lookup.Remove(rhs); + delegates.Remove(node); + } + } + + public void Call(A a, B b, C c) + { + var node = delegates.First; + while (node != null) + { + node.Value(a, b, c); + node = node.Next; + } + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs.meta new file mode 100644 index 0000000..cfbd1a6 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 871f8edd56e84b8fb295b10cc3c78f36 +timeCreated: 1435956061 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs new file mode 100644 index 0000000..dc1ec2f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs @@ -0,0 +1,644 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + + public class MaterialReferenceManager + { + private static MaterialReferenceManager s_Instance; + + // Dictionaries used to track Asset references. + private Dictionary m_FontMaterialReferenceLookup = new Dictionary(); + private Dictionary m_FontAssetReferenceLookup = new Dictionary(); + private Dictionary m_SpriteAssetReferenceLookup = new Dictionary(); + private Dictionary m_ColorGradientReferenceLookup = new Dictionary(); + + + /// + /// Get a singleton instance of the registry + /// + public static MaterialReferenceManager instance + { + get + { + if (MaterialReferenceManager.s_Instance == null) + MaterialReferenceManager.s_Instance = new MaterialReferenceManager(); + return MaterialReferenceManager.s_Instance; + } + } + + + + /// + /// Add new font asset reference to dictionary. + /// + /// + public static void AddFontAsset(TMP_FontAsset fontAsset) + { + MaterialReferenceManager.instance.AddFontAssetInternal(fontAsset); + } + + /// + /// Add new Font Asset reference to dictionary. + /// + /// + private void AddFontAssetInternal(TMP_FontAsset fontAsset) + { + if (m_FontAssetReferenceLookup.ContainsKey(fontAsset.hashCode)) return; + + // Add reference to the font asset. + m_FontAssetReferenceLookup.Add(fontAsset.hashCode, fontAsset); + + // Add reference to the font material. + m_FontMaterialReferenceLookup.Add(fontAsset.materialHashCode, fontAsset.material); + } + + + + /// + /// Add new Sprite Asset to dictionary. + /// + /// + /// + public static void AddSpriteAsset(TMP_SpriteAsset spriteAsset) + { + MaterialReferenceManager.instance.AddSpriteAssetInternal(spriteAsset); + } + + /// + /// Internal method to add a new sprite asset to the dictionary. + /// + /// + /// + private void AddSpriteAssetInternal(TMP_SpriteAsset spriteAsset) + { + if (m_SpriteAssetReferenceLookup.ContainsKey(spriteAsset.hashCode)) return; + + // Add reference to sprite asset. + m_SpriteAssetReferenceLookup.Add(spriteAsset.hashCode, spriteAsset); + + // Adding reference to the sprite asset material as well + m_FontMaterialReferenceLookup.Add(spriteAsset.hashCode, spriteAsset.material); + } + + /// + /// Add new Sprite Asset to dictionary. + /// + /// + /// + public static void AddSpriteAsset(int hashCode, TMP_SpriteAsset spriteAsset) + { + MaterialReferenceManager.instance.AddSpriteAssetInternal(hashCode, spriteAsset); + } + + /// + /// Internal method to add a new sprite asset to the dictionary. + /// + /// + /// + private void AddSpriteAssetInternal(int hashCode, TMP_SpriteAsset spriteAsset) + { + if (m_SpriteAssetReferenceLookup.ContainsKey(hashCode)) return; + + // Add reference to Sprite Asset. + m_SpriteAssetReferenceLookup.Add(hashCode, spriteAsset); + + // Add reference to Sprite Asset using the asset hashcode. + m_FontMaterialReferenceLookup.Add(hashCode, spriteAsset.material); + + // Compatibility check + if (spriteAsset.hashCode == 0) spriteAsset.hashCode = hashCode; + } + + + /// + /// Add new Material reference to dictionary. + /// + /// + /// + public static void AddFontMaterial(int hashCode, Material material) + { + MaterialReferenceManager.instance.AddFontMaterialInternal(hashCode, material); + } + + /// + /// Add new material reference to dictionary. + /// + /// + /// + private void AddFontMaterialInternal(int hashCode, Material material) + { + // Since this function is called after checking if the material is + // contained in the dictionary, there is no need to check again. + m_FontMaterialReferenceLookup.Add(hashCode, material); + } + + + /// + /// Add new Color Gradient Preset to dictionary. + /// + /// + /// + public static void AddColorGradientPreset(int hashCode, TMP_ColorGradient spriteAsset) + { + MaterialReferenceManager.instance.AddColorGradientPreset_Internal(hashCode, spriteAsset); + } + + /// + /// Internal method to add a new Color Gradient Preset to the dictionary. + /// + /// + /// + private void AddColorGradientPreset_Internal(int hashCode, TMP_ColorGradient spriteAsset) + { + if (m_ColorGradientReferenceLookup.ContainsKey(hashCode)) return; + + // Add reference to Color Gradient Preset Asset. + m_ColorGradientReferenceLookup.Add(hashCode, spriteAsset); + } + + + + /// + /// Add new material reference and return the index of this new reference in the materialReferences array. + /// + /// + /// + /// + //public int AddMaterial(Material material, int materialHashCode, TMP_FontAsset fontAsset) + //{ + // if (!m_MaterialReferenceLookup.ContainsKey(materialHashCode)) + // { + // int index = m_MaterialReferenceLookup.Count; + + // materialReferences[index].fontAsset = fontAsset; + // materialReferences[index].material = material; + // materialReferences[index].isDefaultMaterial = material.GetInstanceID() == fontAsset.material.GetInstanceID() ? true : false; + // materialReferences[index].index = index; + // materialReferences[index].referenceCount = 0; + + // m_MaterialReferenceLookup[materialHashCode] = index; + + // // Compute Padding value and store it + // // TODO + + // int fontAssetHashCode = fontAsset.hashCode; + + // if (!m_FontAssetReferenceLookup.ContainsKey(fontAssetHashCode)) + // m_FontAssetReferenceLookup.Add(fontAssetHashCode, fontAsset); + + // m_countInternal += 1; + + // return index; + // } + // else + // { + // return m_MaterialReferenceLookup[materialHashCode]; + // } + //} + + + /// + /// Add new material reference and return the index of this new reference in the materialReferences array. + /// + /// + /// + /// + /// + //public int AddMaterial(Material material, int materialHashCode, TMP_SpriteAsset spriteAsset) + //{ + // if (!m_MaterialReferenceLookup.ContainsKey(materialHashCode)) + // { + // int index = m_MaterialReferenceLookup.Count; + + // materialReferences[index].fontAsset = materialReferences[0].fontAsset; + // materialReferences[index].spriteAsset = spriteAsset; + // materialReferences[index].material = material; + // materialReferences[index].isDefaultMaterial = true; + // materialReferences[index].index = index; + // materialReferences[index].referenceCount = 0; + + // m_MaterialReferenceLookup[materialHashCode] = index; + + // int spriteAssetHashCode = spriteAsset.hashCode; + + // if (!m_SpriteAssetReferenceLookup.ContainsKey(spriteAssetHashCode)) + // m_SpriteAssetReferenceLookup.Add(spriteAssetHashCode, spriteAsset); + + // m_countInternal += 1; + + // return index; + // } + // else + // { + // return m_MaterialReferenceLookup[materialHashCode]; + // } + //} + + + /// + /// Function to check if the font asset is already referenced. + /// + /// + /// + public bool Contains(TMP_FontAsset font) + { + if (m_FontAssetReferenceLookup.ContainsKey(font.hashCode)) + return true; + + return false; + } + + + /// + /// Function to check if the sprite asset is already referenced. + /// + /// + /// + public bool Contains(TMP_SpriteAsset sprite) + { + if (m_FontAssetReferenceLookup.ContainsKey(sprite.hashCode)) + return true; + + return false; + } + + + + /// + /// Function returning the Font Asset corresponding to the provided hash code. + /// + /// + /// + /// + public static bool TryGetFontAsset(int hashCode, out TMP_FontAsset fontAsset) + { + return MaterialReferenceManager.instance.TryGetFontAssetInternal(hashCode, out fontAsset); + } + + /// + /// Internal Function returning the Font Asset corresponding to the provided hash code. + /// + /// + /// + /// + private bool TryGetFontAssetInternal(int hashCode, out TMP_FontAsset fontAsset) + { + fontAsset = null; + + if (m_FontAssetReferenceLookup.TryGetValue(hashCode, out fontAsset)) + { + return true; + } + + return false; + } + + + + /// + /// Function returning the Sprite Asset corresponding to the provided hash code. + /// + /// + /// + /// + public static bool TryGetSpriteAsset(int hashCode, out TMP_SpriteAsset spriteAsset) + { + return MaterialReferenceManager.instance.TryGetSpriteAssetInternal(hashCode, out spriteAsset); + } + + /// + /// Internal function returning the Sprite Asset corresponding to the provided hash code. + /// + /// + /// + /// + private bool TryGetSpriteAssetInternal(int hashCode, out TMP_SpriteAsset spriteAsset) + { + spriteAsset = null; + + if (m_SpriteAssetReferenceLookup.TryGetValue(hashCode, out spriteAsset)) + { + return true; + } + + return false; + } + + + /// + /// Function returning the Color Gradient Preset corresponding to the provided hash code. + /// + /// + /// + /// + public static bool TryGetColorGradientPreset(int hashCode, out TMP_ColorGradient gradientPreset) + { + return MaterialReferenceManager.instance.TryGetColorGradientPresetInternal(hashCode, out gradientPreset); + } + + /// + /// Internal function returning the Color Gradient Preset corresponding to the provided hash code. + /// + /// + /// + /// + private bool TryGetColorGradientPresetInternal(int hashCode, out TMP_ColorGradient gradientPreset) + { + gradientPreset = null; + + if (m_ColorGradientReferenceLookup.TryGetValue(hashCode, out gradientPreset)) + { + return true; + } + + return false; + } + + + /// + /// Function returning the Font Material corresponding to the provided hash code. + /// + /// + /// + /// + public static bool TryGetMaterial(int hashCode, out Material material) + { + return MaterialReferenceManager.instance.TryGetMaterialInternal(hashCode, out material); + } + + /// + /// Internal function returning the Font Material corresponding to the provided hash code. + /// + /// + /// + /// + private bool TryGetMaterialInternal(int hashCode, out Material material) + { + material = null; + + if (m_FontMaterialReferenceLookup.TryGetValue(hashCode, out material)) + { + return true; + } + + return false; + } + + + /// + /// Function to lookup a material based on hash code and returning the MaterialReference containing this material. + /// + /// + /// + /// + //public bool TryGetMaterial(int hashCode, out MaterialReference materialReference) + //{ + // int materialIndex = -1; + + // if (m_MaterialReferenceLookup.TryGetValue(hashCode, out materialIndex)) + // { + // materialReference = materialReferences[materialIndex]; + + // return true; + // } + + // materialReference = new MaterialReference(); + + // return false; + //} + + + + /// + /// + /// + /// + /// + //public int GetMaterialIndex(TMP_FontAsset fontAsset) + //{ + // if (m_MaterialReferenceLookup.ContainsKey(fontAsset.materialHashCode)) + // return m_MaterialReferenceLookup[fontAsset.materialHashCode]; + + // return -1; + //} + + + /// + /// + /// + /// + /// + //public TMP_FontAsset GetFontAsset(int index) + //{ + // if (index >= 0 && index < materialReferences.Length) + // return materialReferences[index].fontAsset; + + // return null; + //} + + + /// + /// + /// + /// + /// + /// + //public void SetDefaultMaterial(Material material, int materialHashCode, TMP_FontAsset fontAsset) + //{ + // if (!m_MaterialReferenceLookup.ContainsKey(materialHashCode)) + // { + // materialReferences[0].fontAsset = fontAsset; + // materialReferences[0].material = material; + // materialReferences[0].index = 0; + // materialReferences[0].isDefaultMaterial = material.GetInstanceID() == fontAsset.material.GetInstanceID() ? true : false; + // materialReferences[0].referenceCount = 0; + // m_MaterialReferenceLookup[materialHashCode] = 0; + + // // Compute Padding value and store it + // // TODO + + // int fontHashCode = fontAsset.hashCode; + + // if (!m_FontAssetReferenceLookup.ContainsKey(fontHashCode)) + // m_FontAssetReferenceLookup.Add(fontHashCode, fontAsset); + // } + // else + // { + // materialReferences[0].fontAsset = fontAsset; + // materialReferences[0].material = material; + // materialReferences[0].index = 0; + // materialReferences[0].referenceCount = 0; + // m_MaterialReferenceLookup[materialHashCode] = 0; + // } + // // Compute padding + // // TODO + + // m_countInternal = 1; + //} + + + + /// + /// + /// + //public void Clear() + //{ + // //m_currentIndex = 0; + // m_MaterialReferenceLookup.Clear(); + // m_SpriteAssetReferenceLookup.Clear(); + // m_FontAssetReferenceLookup.Clear(); + //} + + + /// + /// Function to clear the reference count for each of the material references. + /// + //public void ClearReferenceCount() + //{ + // m_countInternal = 0; + + // for (int i = 0; i < materialReferences.Length; i++) + // { + // if (materialReferences[i].fontAsset == null) + // return; + + // materialReferences[i].referenceCount = 0; + // } + //} + + } + + + + public struct MaterialReference + { + + public int index; + public TMP_FontAsset fontAsset; + public TMP_SpriteAsset spriteAsset; + public Material material; + public bool isDefaultMaterial; + public bool isFallbackMaterial; + public Material fallbackMaterial; + public float padding; + public int referenceCount; + + + /// + /// Constructor for new Material Reference. + /// + /// + /// + /// + /// + /// + public MaterialReference(int index, TMP_FontAsset fontAsset, TMP_SpriteAsset spriteAsset, Material material, float padding) + { + this.index = index; + this.fontAsset = fontAsset; + this.spriteAsset = spriteAsset; + this.material = material; + this.isDefaultMaterial = material.GetInstanceID() == fontAsset.material.GetInstanceID() ? true : false; + this.isFallbackMaterial = false; + this.fallbackMaterial = null; + this.padding = padding; + this.referenceCount = 0; + } + + + /// + /// Function to check if a certain font asset is contained in the material reference array. + /// + /// + /// + /// + public static bool Contains(MaterialReference[] materialReferences, TMP_FontAsset fontAsset) + { + int id = fontAsset.GetInstanceID(); + + for (int i = 0; i < materialReferences.Length && materialReferences[i].fontAsset != null; i++) + { + if (materialReferences[i].fontAsset.GetInstanceID() == id) + return true; + } + + return false; + } + + + /// + /// Function to add a new material reference and returning its index in the material reference array. + /// + /// + /// + /// + /// + /// + public static int AddMaterialReference(Material material, TMP_FontAsset fontAsset, MaterialReference[] materialReferences, Dictionary materialReferenceIndexLookup) + { + int materialID = material.GetInstanceID(); + + if (materialReferenceIndexLookup.TryGetValue(materialID, out int index)) + { + return index; + } + else + { + index = materialReferenceIndexLookup.Count; + + // Add new reference index + materialReferenceIndexLookup[materialID] = index; + + materialReferences[index].index = index; + materialReferences[index].fontAsset = fontAsset; + materialReferences[index].spriteAsset = null; + materialReferences[index].material = material; + materialReferences[index].isDefaultMaterial = materialID == fontAsset.material.GetInstanceID() ? true : false; + //materialReferences[index].padding = 0; + materialReferences[index].referenceCount = 0; + + return index; + } + } + + + /// + /// + /// + /// + /// + /// + /// + /// + public static int AddMaterialReference(Material material, TMP_SpriteAsset spriteAsset, MaterialReference[] materialReferences, Dictionary materialReferenceIndexLookup) + { + int materialID = material.GetInstanceID(); + + if (materialReferenceIndexLookup.TryGetValue(materialID, out int index)) + { + return index; + } + else + { + index = materialReferenceIndexLookup.Count; + + // Add new reference index + materialReferenceIndexLookup[materialID] = index; + + materialReferences[index].index = index; + materialReferences[index].fontAsset = materialReferences[0].fontAsset; + materialReferences[index].spriteAsset = spriteAsset; + materialReferences[index].material = material; + materialReferences[index].isDefaultMaterial = true; + //materialReferences[index].padding = 0; + materialReferences[index].referenceCount = 0; + + return index; + } + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs.meta new file mode 100644 index 0000000..31dbeee --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 11a6a034ab84493cbed6af5ae7aae78b +timeCreated: 1449743129 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs new file mode 100644 index 0000000..d84ee7f --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs @@ -0,0 +1,26 @@ +using UnityEngine; + +namespace TMPro +{ + + // Base class inherited by the various TextMeshPro Assets. + [System.Serializable] + public class TMP_Asset : ScriptableObject + { + /// + /// HashCode based on the name of the asset. + /// + public int hashCode; + + /// + /// The material used by this asset. + /// + public Material material; + + /// + /// HashCode based on the name of the material assigned to this asset. + /// + public int materialHashCode; + + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs.meta new file mode 100644 index 0000000..44fe8a4 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3bda1886f58f4e0ab1139400b160c3ee +timeCreated: 1459318952 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: 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 +{ + /// + /// 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; + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs.meta new file mode 100644 index 0000000..11a7d3a --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4ac5b6a65aaeb59478e3b78660e9f134 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs new file mode 100644 index 0000000..14e2361 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs @@ -0,0 +1,73 @@ +using UnityEngine; +using UnityEngine.TextCore; + +namespace TMPro +{ + public struct TMP_Vertex + { + public Vector3 position; + public Vector2 uv; + public Vector2 uv2; + public Vector2 uv4; + public Color32 color; + + //public Vector3 normal; + //public Vector4 tangent; + } + + /// + /// Structure containing information about individual text elements (character or sprites). + /// + public struct TMP_CharacterInfo + { + public char character; // Should be changed to an int to handle UTF 32 + /// + /// Index of the character in the raw string. + /// + public int index; // Index of the character in the input string. + public int stringLength; + public TMP_TextElementType elementType; + + public TMP_TextElement textElement; + public TMP_FontAsset fontAsset; + public TMP_SpriteAsset spriteAsset; + public int spriteIndex; + public Material material; + public int materialReferenceIndex; + public bool isUsingAlternateTypeface; + + public float pointSize; + + //public short wordNumber; + public int lineNumber; + //public short charNumber; + public int pageNumber; + + + public int vertexIndex; + public TMP_Vertex vertex_BL; + public TMP_Vertex vertex_TL; + public TMP_Vertex vertex_TR; + public TMP_Vertex vertex_BR; + + public Vector3 topLeft; + public Vector3 bottomLeft; + public Vector3 topRight; + public Vector3 bottomRight; + public float origin; + public float ascender; + public float baseLine; + public float descender; + + public float xAdvance; + public float aspectRatio; + public float scale; + public Color32 color; + public Color32 underlineColor; + public Color32 strikethroughColor; + public Color32 highlightColor; + public FontStyles style; + public bool isVisible; + //public bool isIgnoringAlignment; + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta new file mode 100644 index 0000000..8280ad9 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 90fe1c65e6bb3bc4e90862df7297719e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs new file mode 100644 index 0000000..e1d0907 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs @@ -0,0 +1,68 @@ +using UnityEngine; +using System.Collections; + +namespace TMPro +{ + public enum ColorMode + { + Single, + HorizontalGradient, + VerticalGradient, + FourCornersGradient + } + + [System.Serializable] + public class TMP_ColorGradient : ScriptableObject + { + public ColorMode colorMode = ColorMode.FourCornersGradient; + + public Color topLeft; + public Color topRight; + public Color bottomLeft; + public Color bottomRight; + + const ColorMode k_DefaultColorMode = ColorMode.FourCornersGradient; + static readonly Color k_DefaultColor = Color.white; + + /// + /// Default Constructor which sets each of the colors as white. + /// + public TMP_ColorGradient() + { + colorMode = k_DefaultColorMode; + topLeft = k_DefaultColor; + topRight = k_DefaultColor; + bottomLeft = k_DefaultColor; + bottomRight = k_DefaultColor; + } + + /// + /// Constructor allowing to set the default color of the Color Gradient. + /// + /// + public TMP_ColorGradient(Color color) + { + colorMode = k_DefaultColorMode; + topLeft = color; + topRight = color; + bottomLeft = color; + bottomRight = color; + } + + /// + /// The vertex colors at the corners of the characters. + /// + /// Top left color. + /// Top right color. + /// Bottom left color. + /// Bottom right color. + public TMP_ColorGradient(Color color0, Color color1, Color color2, Color color3) + { + colorMode = k_DefaultColorMode; + this.topLeft = color0; + this.topRight = color1; + this.bottomLeft = color2; + this.bottomRight = color3; + } + } +} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs.meta new file mode 100644 index 0000000..28414b6 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 54d21f6ece3b46479f0c328f8c6007e0 +timeCreated: 1468187202 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs new file mode 100644 index 0000000..6d72340 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs @@ -0,0 +1,246 @@ +using UnityEngine; +using UnityEngine.Events; +using System.Collections; + + +namespace TMPro +{ + // Base interface for tweeners, + // using an interface instead of + // an abstract class as we want the + // tweens to be structs. + internal interface ITweenValue + { + void TweenValue(float floatPercentage); + bool ignoreTimeScale { get; } + float duration { get; } + bool ValidTarget(); + } + + // Color tween class, receives the + // TweenValue callback and then sets + // the value on the target. + internal struct ColorTween : ITweenValue + { + public enum ColorTweenMode + { + All, + RGB, + Alpha + } + + public class ColorTweenCallback : UnityEvent { } + + private ColorTweenCallback m_Target; + private Color m_StartColor; + private Color m_TargetColor; + private ColorTweenMode m_TweenMode; + + private float m_Duration; + private bool m_IgnoreTimeScale; + + public Color startColor + { + get { return m_StartColor; } + set { m_StartColor = value; } + } + + public Color targetColor + { + get { return m_TargetColor; } + set { m_TargetColor = value; } + } + + public ColorTweenMode tweenMode + { + get { return m_TweenMode; } + set { m_TweenMode = value; } + } + + public float duration + { + get { return m_Duration; } + set { m_Duration = value; } + } + + public bool ignoreTimeScale + { + get { return m_IgnoreTimeScale; } + set { m_IgnoreTimeScale = value; } + } + + public void TweenValue(float floatPercentage) + { + if (!ValidTarget()) + return; + + var newColor = Color.Lerp(m_StartColor, m_TargetColor, floatPercentage); + + if (m_TweenMode == ColorTweenMode.Alpha) + { + newColor.r = m_StartColor.r; + newColor.g = m_StartColor.g; + newColor.b = m_StartColor.b; + } + else if (m_TweenMode == ColorTweenMode.RGB) + { + newColor.a = m_StartColor.a; + } + m_Target.Invoke(newColor); + } + + public void AddOnChangedCallback(UnityAction callback) + { + if (m_Target == null) + m_Target = new ColorTweenCallback(); + + m_Target.AddListener(callback); + } + + public bool GetIgnoreTimescale() + { + return m_IgnoreTimeScale; + } + + public float GetDuration() + { + return m_Duration; + } + + public bool ValidTarget() + { + return m_Target != null; + } + } + + // Float tween class, receives the + // TweenValue callback and then sets + // the value on the target. + internal struct FloatTween : ITweenValue + { + public class FloatTweenCallback : UnityEvent { } + + private FloatTweenCallback m_Target; + private float m_StartValue; + private float m_TargetValue; + + private float m_Duration; + private bool m_IgnoreTimeScale; + + public float startValue + { + get { return m_StartValue; } + set { m_StartValue = value; } + } + + public float targetValue + { + get { return m_TargetValue; } + set { m_TargetValue = value; } + } + + public float duration + { + get { return m_Duration; } + set { m_Duration = value; } + } + + public bool ignoreTimeScale + { + get { return m_IgnoreTimeScale; } + set { m_IgnoreTimeScale = value; } + } + + public void TweenValue(float floatPercentage) + { + if (!ValidTarget()) + return; + + var newValue = Mathf.Lerp(m_StartValue, m_TargetValue, floatPercentage); + m_Target.Invoke(newValue); + } + + public void AddOnChangedCallback(UnityAction callback) + { + if (m_Target == null) + m_Target = new FloatTweenCallback(); + + m_Target.AddListener(callback); + } + + public bool GetIgnoreTimescale() + { + return m_IgnoreTimeScale; + } + + public float GetDuration() + { + return m_Duration; + } + + public bool ValidTarget() + { + return m_Target != null; + } + } + + // Tween runner, executes the given tween. + // The coroutine will live within the given + // behaviour container. + internal class TweenRunner where T : struct, ITweenValue + { + protected MonoBehaviour m_CoroutineContainer; + protected IEnumerator m_Tween; + + // utility function for starting the tween + private static IEnumerator Start(T tweenInfo) + { + if (!tweenInfo.ValidTarget()) + yield break; + + var elapsedTime = 0.0f; + while (elapsedTime < tweenInfo.duration) + { + elapsedTime += tweenInfo.ignoreTimeScale ? Time.unscaledDeltaTime : Time.deltaTime; + var percentage = Mathf.Clamp01(elapsedTime / tweenInfo.duration); + tweenInfo.TweenValue(percentage); + yield return null; + } + tweenInfo.TweenValue(1.0f); + } + + public void Init(MonoBehaviour coroutineContainer) + { + m_CoroutineContainer = coroutineContainer; + } + + public void StartTween(T info) + { + if (m_CoroutineContainer == null) + { + Debug.LogWarning("Coroutine container not configured... did you forget to call Init?"); + return; + } + + StopTween(); + + if (!m_CoroutineContainer.gameObject.activeInHierarchy) + { + info.TweenValue(1.0f); + return; + } + + m_Tween = Start(info); + m_CoroutineContainer.StartCoroutine(m_Tween); + } + + public void StopTween() + { + if (m_Tween != null) + { + m_CoroutineContainer.StopCoroutine(m_Tween); + m_Tween = null; + } + } + } +} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta new file mode 100644 index 0000000..6c35b49 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 658c1fb149e7498aa072b0c0f3bf13f0 +timeCreated: 1464850953 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_DefaultControls.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_DefaultControls.cs new file mode 100644 index 0000000..abf3d9a --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_DefaultControls.cs @@ -0,0 +1,385 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; + + +namespace TMPro +{ + + public static class TMP_DefaultControls + { + public struct Resources + { + public Sprite standard; + public Sprite background; + public Sprite inputField; + public Sprite knob; + public Sprite checkmark; + public Sprite dropdown; + public Sprite mask; + } + + private const float kWidth = 160f; + private const float kThickHeight = 30f; + private const float kThinHeight = 20f; + private static Vector2 s_ThickElementSize = new Vector2(kWidth, kThickHeight); + private static Vector2 s_ThinElementSize = new Vector2(kWidth, kThinHeight); + //private static Vector2 s_ImageElementSize = new Vector2(100f, 100f); + private static Color s_DefaultSelectableColor = new Color(1f, 1f, 1f, 1f); + //private static Color s_PanelColor = new Color(1f, 1f, 1f, 0.392f); + private static Color s_TextColor = new Color(50f / 255f, 50f / 255f, 50f / 255f, 1f); + + + private static GameObject CreateUIElementRoot(string name, Vector2 size) + { + GameObject child = new GameObject(name); + RectTransform rectTransform = child.AddComponent(); + rectTransform.sizeDelta = size; + return child; + } + + static GameObject CreateUIObject(string name, GameObject parent) + { + GameObject go = new GameObject(name); + go.AddComponent(); + SetParentAndAlign(go, parent); + return go; + } + + private static void SetDefaultTextValues(TMP_Text lbl) + { + // Set text values we want across UI elements in default controls. + // Don't set values which are the same as the default values for the Text component, + // since there's no point in that, and it's good to keep them as consistent as possible. + lbl.color = s_TextColor; + lbl.fontSize = 14; + } + + private static void SetDefaultColorTransitionValues(Selectable slider) + { + ColorBlock colors = slider.colors; + colors.highlightedColor = new Color(0.882f, 0.882f, 0.882f); + colors.pressedColor = new Color(0.698f, 0.698f, 0.698f); + colors.disabledColor = new Color(0.521f, 0.521f, 0.521f); + } + + private static void SetParentAndAlign(GameObject child, GameObject parent) + { + if (parent == null) + return; + + child.transform.SetParent(parent.transform, false); + SetLayerRecursively(child, parent.layer); + } + + private static void SetLayerRecursively(GameObject go, int layer) + { + go.layer = layer; + Transform t = go.transform; + for (int i = 0; i < t.childCount; i++) + SetLayerRecursively(t.GetChild(i).gameObject, layer); + } + + // Actual controls + + public static GameObject CreateScrollbar(Resources resources) + { + // Create GOs Hierarchy + GameObject scrollbarRoot = CreateUIElementRoot("Scrollbar", s_ThinElementSize); + + GameObject sliderArea = CreateUIObject("Sliding Area", scrollbarRoot); + GameObject handle = CreateUIObject("Handle", sliderArea); + + Image bgImage = scrollbarRoot.AddComponent(); + bgImage.sprite = resources.background; + bgImage.type = Image.Type.Sliced; + bgImage.color = s_DefaultSelectableColor; + + Image handleImage = handle.AddComponent(); + handleImage.sprite = resources.standard; + handleImage.type = Image.Type.Sliced; + handleImage.color = s_DefaultSelectableColor; + + RectTransform sliderAreaRect = sliderArea.GetComponent(); + sliderAreaRect.sizeDelta = new Vector2(-20, -20); + sliderAreaRect.anchorMin = Vector2.zero; + sliderAreaRect.anchorMax = Vector2.one; + + RectTransform handleRect = handle.GetComponent(); + handleRect.sizeDelta = new Vector2(20, 20); + + Scrollbar scrollbar = scrollbarRoot.AddComponent(); + scrollbar.handleRect = handleRect; + scrollbar.targetGraphic = handleImage; + SetDefaultColorTransitionValues(scrollbar); + + return scrollbarRoot; + } + + public static GameObject CreateButton(Resources resources) + { + GameObject buttonRoot = CreateUIElementRoot("Button", s_ThickElementSize); + + GameObject childText = new GameObject("Text (TMP)"); + childText.AddComponent(); + SetParentAndAlign(childText, buttonRoot); + + Image image = buttonRoot.AddComponent(); + image.sprite = resources.standard; + image.type = Image.Type.Sliced; + image.color = s_DefaultSelectableColor; + + Button bt = buttonRoot.AddComponent