2025-06-07 17:43:34 +08:00

24 lines
491 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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´íÎó{_dataId} {transform.parent.name}/{transform.name}");
#endif
}
}
}