Update AssetBundleBuilder

AssetBundleBuilder界面增加演练构建选项。
构建文件名增加版本信息。
This commit is contained in:
hevinci
2022-04-27 11:02:30 +08:00
parent 15dc047488
commit 775c724840
9 changed files with 44 additions and 7 deletions
@@ -28,8 +28,9 @@ namespace YooAsset.Editor
// 拷贝Report文件
{
string sourcePath = $"{buildParameters.PipelineOutputDirectory}/{YooAssetSettings.ReportFileName}";
string destPath = $"{packageDirectory}/{YooAssetSettings.ReportFileName}";
string reportFileName = YooAssetSettingsData.GetReportFileName(buildParameters.Parameters.BuildVersion);
string sourcePath = $"{buildParameters.PipelineOutputDirectory}/{reportFileName}";
string destPath = $"{packageDirectory}/{reportFileName}";
EditorTools.CopyFile(sourcePath, destPath, true);
UnityEngine.Debug.Log($"拷贝构建报告文件到:{destPath}");
}
@@ -86,7 +86,7 @@ namespace YooAsset.Editor
}
// 删除旧文件
string filePath = $"{buildParameters.PipelineOutputDirectory}/{YooAssetSettings.ReportFileName}";
string filePath = $"{buildParameters.PipelineOutputDirectory}/{YooAssetSettingsData.GetReportFileName(buildParameters.Parameters.BuildVersion)}";
if (File.Exists(filePath))
File.Delete(filePath);
@@ -26,7 +26,7 @@ namespace YooAsset.Editor
throw new Exception("输出目录不能为空");
// 增量更新时候的必要检测
if (buildParameters.Parameters.ForceRebuild == false)
if (buildParameters.Parameters.DryRunBuild == false && buildParameters.Parameters.ForceRebuild == false)
{
// 检测历史版本是否存在
if (AssetBundleBuilderHelper.HasAnyPackageVersion(buildParameters.Parameters.BuildTarget, buildParameters.Parameters.OutputRoot) == false)
@@ -49,7 +49,7 @@ namespace YooAsset.Editor
}
// 如果是强制重建
if (buildParameters.Parameters.ForceRebuild)
if (buildParameters.Parameters.DryRunBuild == false && buildParameters.Parameters.ForceRebuild)
{
// 删除平台总目录
string platformDirectory = $"{buildParameters.Parameters.OutputRoot}/{buildParameters.Parameters.BuildTarget}";