From 777cc90eaa128960f805363099583463f9aa7e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Thu, 11 Dec 2025 16:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UXTextMeshPro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/UXComponent/{UX.meta => Drag.meta} | 0 Runtime/UXComponent/{UX => Drag}/UXDraggable.cs | 0 Runtime/UXComponent/{UX => Drag}/UXDraggable.cs.meta | 0 Runtime/UXComponent/Text/LocalizationRefreshHelper.cs | 2 +- Runtime/UXComponent/Text/UXTextMeshPro.cs | 3 +-- 5 files changed, 2 insertions(+), 3 deletions(-) rename Runtime/UXComponent/{UX.meta => Drag.meta} (100%) rename Runtime/UXComponent/{UX => Drag}/UXDraggable.cs (100%) rename Runtime/UXComponent/{UX => Drag}/UXDraggable.cs.meta (100%) diff --git a/Runtime/UXComponent/UX.meta b/Runtime/UXComponent/Drag.meta similarity index 100% rename from Runtime/UXComponent/UX.meta rename to Runtime/UXComponent/Drag.meta diff --git a/Runtime/UXComponent/UX/UXDraggable.cs b/Runtime/UXComponent/Drag/UXDraggable.cs similarity index 100% rename from Runtime/UXComponent/UX/UXDraggable.cs rename to Runtime/UXComponent/Drag/UXDraggable.cs diff --git a/Runtime/UXComponent/UX/UXDraggable.cs.meta b/Runtime/UXComponent/Drag/UXDraggable.cs.meta similarity index 100% rename from Runtime/UXComponent/UX/UXDraggable.cs.meta rename to Runtime/UXComponent/Drag/UXDraggable.cs.meta diff --git a/Runtime/UXComponent/Text/LocalizationRefreshHelper.cs b/Runtime/UXComponent/Text/LocalizationRefreshHelper.cs index 7ae6765..d3467ee 100644 --- a/Runtime/UXComponent/Text/LocalizationRefreshHelper.cs +++ b/Runtime/UXComponent/Text/LocalizationRefreshHelper.cs @@ -19,7 +19,7 @@ namespace UnityEngine.UI return previewLabelDic[key]; } - return string.Empty; + return key; } static void Init() diff --git a/Runtime/UXComponent/Text/UXTextMeshPro.cs b/Runtime/UXComponent/Text/UXTextMeshPro.cs index b31361e..188c5f9 100644 --- a/Runtime/UXComponent/Text/UXTextMeshPro.cs +++ b/Runtime/UXComponent/Text/UXTextMeshPro.cs @@ -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()