// Start is called before the first frame update
 void Start()
 {
     foreach (var text in Texts)
     {
         text.text = LocalizationCore.Localize(text.text);
     }
 }
    private void LoadLocalText()
    {
        LocalizationCore.LoadLocaleText(languageLabel.text);

        foreach (var item in textForTranslate)
        {
            item.text = LocalizationCore.GetTextById(item.name);
        }
    }
Пример #3
0
 // Awake is called when the script instance is being loaded
 private void Awake()
 {
     if (_singleInstance == null)
     {
         _singleInstance = this;
         DontDestroyOnLoad(this.gameObject);
         _localisation = TryLoadLocalisation();
     }
     else
     {
         Destroy(this.gameObject);
     }
 }