Files
UltimateFishing2020/Assets/Scripts/Assembly-CSharp/RewiredButtonsLocalizationUIText.cs
2026-03-04 10:03:45 +08:00

36 lines
553 B
C#

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<Text>();
if ((bool)component)
{
if (string.IsNullOrEmpty(LanguageManager.Instance.GetText(key)))
{
component.text = "Key error: " + key;
}
else
{
component.text = LanguageManager.Instance.GetText(key);
}
}
}
}