20 lines
388 B
C#
20 lines
388 B
C#
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).Replace("\\n", "\n");
|
|
}
|
|
}
|