update editor windows
This commit is contained in:
@@ -14,8 +14,7 @@ namespace YooAsset.Editor
|
||||
[MenuItem("YooAsset/AssetBundle Builder", false, 102)]
|
||||
public static void OpenWindow()
|
||||
{
|
||||
string windowName = Localization.Language(ELanguageKey.ABB_WindowTitle);
|
||||
AssetBundleBuilderWindow window = GetWindow<AssetBundleBuilderWindow>(windowName, true, WindowsDefine.DockedWindowTypes);
|
||||
AssetBundleBuilderWindow window = GetWindow<AssetBundleBuilderWindow>("AssetBundle Builder", true, WindowsDefine.DockedWindowTypes);
|
||||
window.minSize = new Vector2(800, 600);
|
||||
}
|
||||
|
||||
@@ -48,7 +47,7 @@ namespace YooAsset.Editor
|
||||
if (packageNames.Count == 0)
|
||||
{
|
||||
var label = new Label();
|
||||
label.text = Localization.Language(ELanguageKey.AAB_NoPackageTips);
|
||||
label.text = "Not found any package";
|
||||
label.style.width = 100;
|
||||
_toolbar.Add(label);
|
||||
return;
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace YooAsset.Editor
|
||||
public void PackAsset(BuildAssetInfo assetInfo)
|
||||
{
|
||||
if (IsContainsAsset(assetInfo.AssetPath))
|
||||
throw new System.Exception($"Asset is existed : {assetInfo.AssetPath}");
|
||||
throw new System.Exception($"Should never get here ! Asset is existed : {assetInfo.AssetPath}");
|
||||
|
||||
MainAssets.Add(assetInfo);
|
||||
}
|
||||
|
||||
+4
-2
@@ -31,11 +31,13 @@ namespace YooAsset.Editor
|
||||
buildReport.Summary.BuildMode = buildParameters.BuildMode;
|
||||
buildReport.Summary.BuildPackageName = buildParameters.PackageName;
|
||||
buildReport.Summary.BuildPackageVersion = buildParameters.PackageVersion;
|
||||
buildReport.Summary.UniqueBundleName = buildMapContext.Command.UniqueBundleName;
|
||||
buildReport.Summary.EnableAddressable = buildMapContext.Command.EnableAddressable;
|
||||
buildReport.Summary.LocationToLower = buildMapContext.Command.LocationToLower;
|
||||
buildReport.Summary.IncludeAssetGUID = buildMapContext.Command.IncludeAssetGUID;
|
||||
buildReport.Summary.UniqueBundleName = buildMapContext.Command.UniqueBundleName;
|
||||
buildReport.Summary.EncryptionServicesClassName = buildParameters.EncryptionServices == null ?
|
||||
buildReport.Summary.IgnoreDefaultType = buildMapContext.Command.IgnoreDefaultType;
|
||||
buildReport.Summary.AutoCollectShaders = buildMapContext.Command.AutoCollectShaders;
|
||||
buildReport.Summary.EncryptionClassName = buildParameters.EncryptionServices == null ?
|
||||
"null" : buildParameters.EncryptionServices.GetType().FullName;
|
||||
|
||||
// 构建参数
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace YooAsset.Editor
|
||||
var buildModeList = GetSupportBuildModes();
|
||||
int defaultIndex = buildModeList.FindIndex(x => x.Equals(buildMode));
|
||||
_buildModeField = new PopupField<Enum>(buildModeList, defaultIndex);
|
||||
_buildModeField.label = "ABB_BuildMode";
|
||||
_buildModeField.label = "Build Mode";
|
||||
_buildModeField.style.width = StyleWidth;
|
||||
_buildModeField.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
@@ -84,7 +84,7 @@ namespace YooAsset.Editor
|
||||
var encyptionClassName = AssetBundleBuilderSetting.GetPackageEncyptionClassName(PackageName, BuildPipeline);
|
||||
int defaultIndex = encryptionClassTypes.FindIndex(x => x.FullName.Equals(encyptionClassName));
|
||||
_encryptionField = new PopupField<Type>(encryptionClassTypes, defaultIndex);
|
||||
_encryptionField.label = "ABB_Encryption";
|
||||
_encryptionField.label = "Encryption";
|
||||
_encryptionField.style.width = StyleWidth;
|
||||
_encryptionField.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
@@ -95,7 +95,7 @@ namespace YooAsset.Editor
|
||||
else
|
||||
{
|
||||
_encryptionField = new PopupField<Type>();
|
||||
_encryptionField.label = "ABB_Encryption";
|
||||
_encryptionField.label = "Encryption";
|
||||
_encryptionField.style.width = StyleWidth;
|
||||
encryptionContainer.Add(_encryptionField);
|
||||
}
|
||||
@@ -147,17 +147,6 @@ namespace YooAsset.Editor
|
||||
// 构建按钮
|
||||
var buildButton = Root.Q<Button>("Build");
|
||||
buildButton.clicked += BuildButton_clicked;
|
||||
|
||||
// 本地化设置
|
||||
UIElementsLocalize.Localize(_buildOutputField);
|
||||
UIElementsLocalize.Localize(_buildVersionField);
|
||||
UIElementsLocalize.Localize(_buildModeField);
|
||||
UIElementsLocalize.Localize(_encryptionField);
|
||||
UIElementsLocalize.Localize(_compressionField);
|
||||
UIElementsLocalize.Localize(_outputNameStyleField);
|
||||
UIElementsLocalize.Localize(_copyBuildinFileOptionField);
|
||||
UIElementsLocalize.Localize(_copyBuildinFileTagsField);
|
||||
UIElementsLocalize.Localize(buildButton);
|
||||
}
|
||||
private void RefreshView()
|
||||
{
|
||||
|
||||
+7
-7
@@ -1,14 +1,14 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
||||
<ui:VisualElement name="BuildContainer">
|
||||
<ui:TextField picking-mode="Ignore" label="ABB_BuildOutput" name="BuildOutput" />
|
||||
<ui:TextField picking-mode="Ignore" label="ABB_BuildVersion" name="BuildVersion" />
|
||||
<ui:TextField picking-mode="Ignore" label="Build Output" name="BuildOutput" />
|
||||
<ui:TextField picking-mode="Ignore" label="Build Version" name="BuildVersion" />
|
||||
<ui:VisualElement name="BuildModeContainer" style="height: 24px;" />
|
||||
<ui:VisualElement name="EncryptionContainer" style="height: 24px;" />
|
||||
<uie:EnumField label="ABB_Compression" value="Center" name="Compression" />
|
||||
<uie:EnumField label="ABB_FileNameStyle" value="Center" name="FileNameStyle" />
|
||||
<uie:EnumField label="ABB_CopyBuildinFileOption" value="Center" name="CopyBuildinFileOption" />
|
||||
<ui:TextField picking-mode="Ignore" label="ABB_CopyBuildinFileParam" name="CopyBuildinFileParam" />
|
||||
<uie:EnumField label="Compression" value="Center" name="Compression" />
|
||||
<uie:EnumField label="File Name Style" value="Center" name="FileNameStyle" />
|
||||
<uie:EnumField label="Copy Buildin File Option" value="Center" name="CopyBuildinFileOption" />
|
||||
<ui:TextField picking-mode="Ignore" label="Copy Buildin File Param" name="CopyBuildinFileParam" />
|
||||
<ui:VisualElement name="ExtensionContainer" />
|
||||
<ui:Button text="ABB_ClickBuild" display-tooltip-when-elided="true" name="Build" style="height: 50px; background-color: rgb(40, 106, 42); margin-top: 10px;" />
|
||||
<ui:Button text="Click Build" display-tooltip-when-elided="true" name="Build" style="height: 50px; background-color: rgb(40, 106, 42); margin-top: 10px;" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
|
||||
Reference in New Issue
Block a user