23 lines
379 B
C#
23 lines
379 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class TextFormat : MonoBehaviour
|
|
{
|
|
public string before = string.Empty;
|
|
|
|
public string textId = string.Empty;
|
|
|
|
public string after = string.Empty;
|
|
|
|
private Text text;
|
|
|
|
private void OnEnable()
|
|
{
|
|
if (text == null)
|
|
{
|
|
text = GetComponent<Text>();
|
|
}
|
|
text.text = before + Utilities.GetTranslation(textId) + after;
|
|
}
|
|
}
|