修改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 previewLabelDic[key];
} }
return string.Empty; return key;
} }
static void Init() static void Init()

View File

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