fix
This commit is contained in:
parent
4546da4928
commit
f6715dbfae
@ -147,6 +147,7 @@ namespace UnityEngine.UI
|
|||||||
// 检查是否找不到对应 ID 的 key
|
// 检查是否找不到对应 ID 的 key
|
||||||
if (localizationID.intValue > 0 && !allTableNames.ContainsKey(localizationID.intValue))
|
if (localizationID.intValue > 0 && !allTableNames.ContainsKey(localizationID.intValue))
|
||||||
{
|
{
|
||||||
|
m_localizationKey.stringValue = string.Empty;
|
||||||
EditorGUILayout.HelpBox($"已选择的多语言 Key (ID={localizationID.intValue}) 已被删除,但仍然保留该 ID。", MessageType.Warning);
|
EditorGUILayout.HelpBox($"已选择的多语言 Key (ID={localizationID.intValue}) 已被删除,但仍然保留该 ID。", MessageType.Warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,10 @@ namespace UnityEngine.UI
|
|||||||
protected override void OnValidate()
|
protected override void OnValidate()
|
||||||
{
|
{
|
||||||
base.OnValidate();
|
base.OnValidate();
|
||||||
if (!Application.isPlaying) text = LocalizationRefreshHelper.GetPreviewLabel(m_localizationKey);
|
if (!Application.isPlaying && !string.IsNullOrEmpty(m_localizationKey))
|
||||||
|
{
|
||||||
|
text = LocalizationRefreshHelper.GetPreviewLabel(m_localizationKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
protected override void Start()
|
protected override void Start()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user