using UnityEngine; using UnityEngine.UI; public class RewiredButtonsLocalizationUIText : MonoBehaviour { public string key; private void Start() { } private void Update() { } public void RefreshText() { if (!(LanguageManager.Instance != null)) { return; } Text component = GetComponent(); if ((bool)component) { if (string.IsNullOrEmpty(LanguageManager.Instance.GetText(key))) { component.text = "Key error: " + key; } else { component.text = LanguageManager.Instance.GetText(key); } } } }