using UnityEngine; using UnityEngine.UI; using System.Collections; public class LocalizationText : MonoBehaviour { //Connections public Text TextComp; //Attributes public string LocID = ""; public string Prefix = ""; public string Suffix = ""; //Stats //------------------------------------------------------------------------------------ void Start () { Invoke("LoadLanguage", Random.Range(0.1f, 0.2f)); } //------------------------------------------------------------------------------------- void LoadLanguage() { if (TextComp == null) { TextComp = GetComponent(); } TextComp.text = Prefix + LocalizationManager.GetText(LocID) + Suffix; } //************************************************************************************* }