update editor
1. 编辑器界面支持本地化配置。 2. 资源构建过程中的异常输出增加错误码提示。 3. 修复了资源构建界面乱码问题。 4. 修复了自动收集着色器对依赖资源无效的问题。
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#if UNITY_2019_4_OR_NEWER
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public static class UIElementsLocalize
|
||||
{
|
||||
public static void Localize(TextField element)
|
||||
{
|
||||
ELanguageKey key = Localization.Convert(element.label);
|
||||
element.label = Localization.Language(key);
|
||||
}
|
||||
|
||||
public static void Localize(Button element)
|
||||
{
|
||||
ELanguageKey key = Localization.Convert(element.text);
|
||||
element.text = Localization.Language(key);
|
||||
}
|
||||
|
||||
public static void Localize(EnumField element)
|
||||
{
|
||||
ELanguageKey key = Localization.Convert(element.label);
|
||||
element.label = Localization.Language(key);
|
||||
}
|
||||
|
||||
public static void Localize(PopupField<Enum> element)
|
||||
{
|
||||
ELanguageKey key = Localization.Convert(element.label);
|
||||
element.label = Localization.Language(key);
|
||||
}
|
||||
|
||||
public static void Localize(PopupField<Type> element)
|
||||
{
|
||||
ELanguageKey key = Localization.Convert(element.label);
|
||||
element.label = Localization.Language(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user