24 lines
491 B
C#
24 lines
491 B
C#
|
using TMPro;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
[DisallowMultipleComponent]
|
|||
|
public class LanguageText : MonoBase
|
|||
|
{
|
|||
|
[SerializeField]
|
|||
|
private string _dataId;
|
|||
|
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
var tm = GetComponent<TextMeshProUGUI>();
|
|||
|
if(tm != null)
|
|||
|
{
|
|||
|
tm.text = Game.language.GetLangByID(_dataId);
|
|||
|
#if UNITY_EDITOR
|
|||
|
if (tm.text == "0")
|
|||
|
LogError($"language<67><65><EFBFBD><EFBFBD>{_dataId} {transform.parent.name}/{transform.name}");
|
|||
|
#endif
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|