diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilder.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilder.cs
index 838a942..2079263 100644
--- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilder.cs
+++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilder.cs
@@ -59,6 +59,7 @@ namespace YooAsset.Editor
new TaskCreatePatchManifest(), //创建清单文件
new TaskCreateReport(), //创建报告文件
new TaskCreatePatchPackage(), //制作补丁包
+ new TaskCopyBuildinFiles(), //拷贝内置文件
};
}
else if (buildParameters.BuildPipeline == EBuildPipeline.ScriptableBuildPipeline)
@@ -73,6 +74,7 @@ namespace YooAsset.Editor
new TaskCreatePatchManifest(), //创建清单文件
new TaskCreateReport(), //创建报告文件
new TaskCreatePatchPackage(), //制作补丁包
+ new TaskCopyBuildinFiles(), //拷贝内置文件
};
}
else
diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSetting.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSetting.cs
index 24d7661..19f23d4 100644
--- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSetting.cs
+++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSetting.cs
@@ -30,6 +30,16 @@ namespace YooAsset.Editor
///
public EOutputNameStyle OutputNameStyle = EOutputNameStyle.HashName;
+ ///
+ /// 首包资源文件的拷贝方式
+ ///
+ public ECopyBuildinFileOption CopyBuildinFileOption = ECopyBuildinFileOption.None;
+
+ ///
+ /// 首包资源文件的标签集合
+ ///
+ public string CopyBuildinFileTags = string.Empty;
+
///
/// 加密类名称
///
diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs
index 2f9934f..dd23547 100644
--- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs
+++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs
@@ -31,6 +31,8 @@ namespace YooAsset.Editor
private PopupField _encryptionField;
private EnumField _compressionField;
private EnumField _outputNameStyleField;
+ private EnumField _copyBuildinFileOptionField;
+ private TextField _copyBuildinFileTagsField;
public void CreateGUI()
{
@@ -135,7 +137,7 @@ namespace YooAsset.Editor
encryptionContainer.Add(_encryptionField);
}
- // 压缩方式
+ // 压缩方式选项
_compressionField = root.Q("Compression");
_compressionField.Init(AssetBundleBuilderSettingData.Setting.CompressOption);
_compressionField.SetValueWithoutNotify(AssetBundleBuilderSettingData.Setting.CompressOption);
@@ -157,6 +159,27 @@ namespace YooAsset.Editor
AssetBundleBuilderSettingData.Setting.OutputNameStyle = (EOutputNameStyle)_outputNameStyleField.value;
});
+ // 首包文件拷贝选项
+ _copyBuildinFileOptionField = root.Q("CopyBuildinFileOption");
+ _copyBuildinFileOptionField.Init(AssetBundleBuilderSettingData.Setting.CopyBuildinFileOption);
+ _copyBuildinFileOptionField.SetValueWithoutNotify(AssetBundleBuilderSettingData.Setting.CopyBuildinFileOption);
+ _copyBuildinFileOptionField.style.width = 350;
+ _copyBuildinFileOptionField.RegisterValueChangedCallback(evt =>
+ {
+ AssetBundleBuilderSettingData.IsDirty = true;
+ AssetBundleBuilderSettingData.Setting.CopyBuildinFileOption = (ECopyBuildinFileOption)_copyBuildinFileOptionField.value;
+ RefreshWindow();
+ });
+
+ // 首包文件的资源标签
+ _copyBuildinFileTagsField = root.Q("CopyBuildinFileTags");
+ _copyBuildinFileTagsField.SetValueWithoutNotify(AssetBundleBuilderSettingData.Setting.CopyBuildinFileTags);
+ _copyBuildinFileTagsField.RegisterValueChangedCallback(evt =>
+ {
+ AssetBundleBuilderSettingData.IsDirty = true;
+ AssetBundleBuilderSettingData.Setting.CopyBuildinFileTags = _copyBuildinFileTagsField.value;
+ });
+
// 构建按钮
var buildButton = root.Q