From e8dd5d4fd406e6e6b710cbe85309f6870bccc37a Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 3 Nov 2019 18:31:04 -0500 Subject: Remove everything --- .../Scripts/Behaviours/LeanLocalizedTextMesh.cs | 46 ---------------------- 1 file changed, 46 deletions(-) delete mode 100644 Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedTextMesh.cs (limited to 'Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedTextMesh.cs') diff --git a/Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedTextMesh.cs b/Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedTextMesh.cs deleted file mode 100644 index c9fcbc6..0000000 --- a/Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedTextMesh.cs +++ /dev/null @@ -1,46 +0,0 @@ -using UnityEngine; - -namespace Lean.Localization -{ - /// This component will update a TMPro.TextMeshProUGUI component with localized text, or use a fallback if none is found. - [ExecuteInEditMode] - [DisallowMultipleComponent] - [RequireComponent(typeof(TextMesh))] - [AddComponentMenu(LeanLocalization.ComponentPathPrefix + "Localized TextMesh")] - public class LeanLocalizedTextMesh : LeanLocalizedBehaviour - { - [Tooltip("If PhraseName couldn't be found, this text will be used")] - public string FallbackText; - - // This gets called every time the translation needs updating - public override void UpdateTranslation(LeanTranslation translation) - { - // Get the TextMeshProUGUI component attached to this GameObject - var text = GetComponent(); - - // Use translation? - if (translation != null && translation.Data is string) - { - text.text = LeanTranslation.FormatText((string)translation.Data, text.text, this); - } - // Use fallback? - else - { - text.text = LeanTranslation.FormatText(FallbackText, text.text, this); - } - } - - protected virtual void Awake() - { - // Should we set FallbackText? - if (string.IsNullOrEmpty(FallbackText) == true) - { - // Get the TextMeshProUGUI component attached to this GameObject - var text = GetComponent(); - - // Copy current text to fallback - FallbackText = text.text; - } - } - } -} \ No newline at end of file -- cgit v1.2.3