修改UXTextMeshPro

This commit is contained in:
陈思海 2025-12-11 16:52:46 +08:00
parent 5084130abe
commit 777cc90eaa
5 changed files with 2 additions and 3 deletions

View File

@ -19,7 +19,7 @@ namespace UnityEngine.UI
return previewLabelDic[key];
}
return string.Empty;
return key;
}
static void Init()

View File

@ -1,5 +1,4 @@
#if TEXTMESHPRO_SUPPORT
using TMPro;
namespace UnityEngine.UI
@ -13,7 +12,7 @@ namespace UnityEngine.UI
protected override void OnValidate()
{
base.OnValidate();
if (Application.isEditor) text = LocalizationRefreshHelper.GetPreviewLabel(m_localizationKey);
if (!Application.isPlaying) text = LocalizationRefreshHelper.GetPreviewLabel(m_localizationKey);
}
#endif
protected override void Start()