TouhouLS/TouhouStation/Assets/Code/Localization/LocalizationButtonInjector.cs

20 lines
367 B
C#
Raw Normal View History

2020-08-22 05:29:00 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class LocalizationButtonInjector : MonoBehaviour {
private TMP_Text text;
public string key;
private void Start() {
text = GetComponent<TMP_Text>();
UpdateText();
}
public void UpdateText() {
text.text = Localization.GetString(key);
}
}