using UnityEngine; using UnityEngine.UI; public class TextFormat : MonoBehaviour { public string before = string.Empty; public string textId = string.Empty; public string after = string.Empty; private Text text; private void OnEnable() { if (text == null) { text = GetComponent(); } text.text = before + Utilities.GetTranslation(textId) + after; } }