Update AssetBundleBuilder
parent
9d4656a1f2
commit
33387e8d26
|
@ -34,10 +34,5 @@ namespace YooAsset.Editor
|
|||
/// 附加后缀格式
|
||||
/// </summary>
|
||||
public bool AppendExtension = false;
|
||||
|
||||
/// <summary>
|
||||
/// 拷贝内置资源文件(首包资源文件)
|
||||
/// </summary>
|
||||
public bool CopyBuildinTagFiles = true;
|
||||
}
|
||||
}
|
|
@ -29,7 +29,6 @@ namespace YooAsset.Editor
|
|||
private PopupField<string> _encryptionField;
|
||||
private EnumField _compressionField;
|
||||
private Toggle _appendExtensionToggle;
|
||||
private Toggle _copyBuildinTagFilesToggle;
|
||||
|
||||
public void CreateGUI()
|
||||
{
|
||||
|
@ -122,14 +121,6 @@ namespace YooAsset.Editor
|
|||
AssetBundleBuilderSettingData.Setting.AppendExtension = _appendExtensionToggle.value;
|
||||
});
|
||||
|
||||
// 拷贝首包文件
|
||||
_copyBuildinTagFilesToggle = root.Q<Toggle>("CopyBuildinFiles");
|
||||
_copyBuildinTagFilesToggle.SetValueWithoutNotify(AssetBundleBuilderSettingData.Setting.CopyBuildinTagFiles);
|
||||
_copyBuildinTagFilesToggle.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
AssetBundleBuilderSettingData.Setting.CopyBuildinTagFiles = _copyBuildinTagFilesToggle.value;
|
||||
});
|
||||
|
||||
// 构建按钮
|
||||
var buildButton = root.Q<Button>("Build");
|
||||
buildButton.clicked += BuildButton_clicked; ;
|
||||
|
@ -154,7 +145,6 @@ namespace YooAsset.Editor
|
|||
_encryptionField.SetEnabled(enableElement);
|
||||
_compressionField.SetEnabled(enableElement);
|
||||
_appendExtensionToggle.SetEnabled(enableElement);
|
||||
_copyBuildinTagFilesToggle.SetEnabled(buildMode == EBuildMode.ForceRebuild || buildMode == EBuildMode.IncrementalBuild);
|
||||
}
|
||||
private void BuildButton_clicked()
|
||||
{
|
||||
|
@ -175,17 +165,19 @@ namespace YooAsset.Editor
|
|||
/// </summary>
|
||||
private void ExecuteBuild()
|
||||
{
|
||||
var buildMode = (EBuildMode)_buildModeField.value;
|
||||
|
||||
string defaultOutputRoot = AssetBundleBuilderHelper.GetDefaultOutputRoot();
|
||||
BuildParameters buildParameters = new BuildParameters();
|
||||
buildParameters.OutputRoot = defaultOutputRoot;
|
||||
buildParameters.BuildTarget = _buildTarget;
|
||||
buildParameters.BuildMode = (EBuildMode)_buildModeField.value;
|
||||
buildParameters.BuildMode = buildMode;
|
||||
buildParameters.BuildVersion = _buildVersionField.value;
|
||||
buildParameters.BuildinTags = _buildinTagsField.value;
|
||||
buildParameters.VerifyBuildingResult = true;
|
||||
buildParameters.EnableAddressable = AssetBundleCollectorSettingData.Setting.EnableAddressable;
|
||||
buildParameters.AppendFileExtension = _appendExtensionToggle.value;
|
||||
buildParameters.CopyBuildinTagFiles = _copyBuildinTagFilesToggle.value;
|
||||
buildParameters.CopyBuildinTagFiles = buildMode == EBuildMode.ForceRebuild;
|
||||
buildParameters.EncryptionServices = CreateEncryptionServicesInstance();
|
||||
buildParameters.CompressOption = (ECompressOption)_compressionField.value;
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<ui:VisualElement name="EncryptionContainer" style="height: 24px;" />
|
||||
<uie:EnumField label="Compression" value="Center" name="Compression" />
|
||||
<ui:Toggle label="Append Extension" name="AppendExtension" style="height: 15px;" />
|
||||
<ui:Toggle label="Copy BuildinTag Files" name="CopyBuildinFiles" style="height: 15px;" />
|
||||
<ui:TextField picking-mode="Ignore" label="Buildin Tags" name="BuildinTags" />
|
||||
<ui:Button text="构建" display-tooltip-when-elided="true" name="Build" style="height: 50px; background-color: rgb(40, 106, 42); margin-top: 10px;" />
|
||||
</ui:VisualElement>
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace YooAsset.Editor
|
|||
public bool AppendFileExtension = false;
|
||||
|
||||
/// <summary>
|
||||
/// 拷贝内置资源文件(首包资源文件)
|
||||
/// 拷贝内置资源文件到StreamingAssets目录(首包资源文件)
|
||||
/// </summary>
|
||||
public bool CopyBuildinTagFiles = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue