diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilder.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilder.cs index 960c97b..98baacd 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilder.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilder.cs @@ -41,9 +41,9 @@ namespace YooAsset.Editor // 是否显示LOG if (buildParameters.BuildMode == EBuildMode.SimulateBuild) - BuildRunner.EnableLog = false; + BuildLogger.EnableLog = false; else - BuildRunner.EnableLog = true; + BuildLogger.EnableLog = true; // 创建构建节点 List pipeline; diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildMapCreater.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildMapCreater.cs index 46417ce..c4979f3 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildMapCreater.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildMapCreater.cs @@ -138,7 +138,7 @@ namespace YooAsset.Editor } } - BuildRunner.Log($"发现未被依赖的资源并自动移除 : {dependAssetPath}"); + BuildLogger.Log($"发现未被依赖的资源并自动移除 : {dependAssetPath}"); return true; } } diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParametersContext.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParametersContext.cs index d751f33..fbd35fc 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParametersContext.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParametersContext.cs @@ -7,8 +7,6 @@ namespace YooAsset.Editor { public class BuildParametersContext : IContextObject { - private readonly System.Diagnostics.Stopwatch _buildWatch = new System.Diagnostics.Stopwatch(); - private string _pipelineOutputDirectory = string.Empty; private string _packageOutputDirectory = string.Empty; @@ -117,22 +115,5 @@ namespace YooAsset.Editor return buildParams; } - - /// - /// 获取构建的耗时(单位:秒) - /// - public float GetBuildingSeconds() - { - float seconds = _buildWatch.ElapsedMilliseconds / 1000f; - return seconds; - } - public void BeginWatch() - { - _buildWatch.Start(); - } - public void StopWatch() - { - _buildWatch.Stop(); - } } } \ No newline at end of file diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildLogger.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildLogger.cs new file mode 100644 index 0000000..daf1b21 --- /dev/null +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildLogger.cs @@ -0,0 +1,30 @@ + +namespace YooAsset.Editor +{ + public static class BuildLogger + { + /// + /// 是否启用LOG + /// + public static bool EnableLog = true; + + /// + /// 日志输出 + /// + public static void Log(string info) + { + if (EnableLog) + { + UnityEngine.Debug.Log(info); + } + } + + /// + /// 日志输出 + /// + public static void Info(string info) + { + UnityEngine.Debug.Log(info); + } + } +} \ No newline at end of file diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildLogger.cs.meta b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildLogger.cs.meta new file mode 100644 index 0000000..8fad97d --- /dev/null +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildLogger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2bc82466a51f50141975e4424095aa09 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildRunner.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildRunner.cs index 9fb013c..b9f365a 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildRunner.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildSystem/BuildRunner.cs @@ -2,13 +2,19 @@ using System.Collections; using System.Collections.Generic; using System.Reflection; +using System.Diagnostics; using UnityEngine; namespace YooAsset.Editor { public class BuildRunner { - public static bool EnableLog = true; + private static Stopwatch _buildWatch; + + /// + /// 总耗时 + /// + public static int TotalSeconds = 0; /// /// 执行构建流程 @@ -23,14 +29,22 @@ namespace YooAsset.Editor BuildResult buildResult = new BuildResult(); buildResult.Success = true; + TotalSeconds = 0; for (int i = 0; i < pipeline.Count; i++) { IBuildTask task = pipeline[i]; try { + _buildWatch = Stopwatch.StartNew(); var taskAttribute = task.GetType().GetCustomAttribute(); - Log($"---------------------------------------->{taskAttribute.Desc}<---------------------------------------"); + BuildLogger.Log($"---------------------------------------->{taskAttribute.Desc}<---------------------------------------"); task.Run(context); + _buildWatch.Stop(); + + // 统计耗时 + int seconds = GetBuildSeconds(); + TotalSeconds += seconds; + BuildLogger.Log($"{taskAttribute.Desc}耗时:{seconds}秒"); } catch (Exception e) { @@ -42,26 +56,14 @@ namespace YooAsset.Editor } // 返回运行结果 + BuildLogger.Log($"构建过程总计耗时:{TotalSeconds}秒"); return buildResult; } - /// - /// 日志输出 - /// - public static void Log(string info) + private static int GetBuildSeconds() { - if (EnableLog) - { - UnityEngine.Debug.Log(info); - } - } - - /// - /// 日志输出 - /// - public static void Info(string info) - { - UnityEngine.Debug.Log(info); + float seconds = _buildWatch.ElapsedMilliseconds / 1000f; + return (int)seconds; } } } \ No newline at end of file diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding.cs index 89177eb..da267bd 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding.cs @@ -41,7 +41,7 @@ namespace YooAsset.Editor throw new Exception("构建过程中发生严重错误!请查阅上下文日志!"); } - BuildRunner.Log("Unity引擎打包成功!"); + BuildLogger.Log("Unity引擎打包成功!"); BuildResultContext buildResultContext = new BuildResultContext(); buildResultContext.UnityManifest = buildResults; context.SetContextObject(buildResultContext); diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding_SBP.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding_SBP.cs index 5f4323a..80ce01f 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding_SBP.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding_SBP.cs @@ -40,7 +40,7 @@ namespace YooAsset.Editor throw new Exception($"构建过程中发生错误 : {exitCode}"); } - BuildRunner.Log("Unity引擎打包成功!"); + BuildLogger.Log("Unity引擎打包成功!"); BuildResultContext buildResultContext = new BuildResultContext(); buildResultContext.Results = buildResults; context.SetContextObject(buildResultContext); diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCopyBuildinFiles.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCopyBuildinFiles.cs index 20b883d..7070ceb 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCopyBuildinFiles.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCopyBuildinFiles.cs @@ -94,7 +94,7 @@ namespace YooAsset.Editor // 刷新目录 AssetDatabase.Refresh(); - BuildRunner.Log($"内置文件拷贝完成:{streamingAssetsDirectory}"); + BuildLogger.Log($"内置文件拷贝完成:{streamingAssetsDirectory}"); } } } \ No newline at end of file diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs index d9d5f87..004022c 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs @@ -67,7 +67,7 @@ namespace YooAsset.Editor if (buildParameters.BuildMode != EBuildMode.SimulateBuild) { var buildResultContext = context.GetContextObject(); - UpdateBuiltinPipelineReference(patchManifest, buildResultContext, buildMapContext); + UpdateBuiltinPipelineReference(patchManifest, buildResultContext); } } @@ -76,7 +76,7 @@ namespace YooAsset.Editor string fileName = YooAssetSettingsData.GetManifestJsonFileName(buildParameters.PackageName, buildParameters.PackageVersion); string filePath = $"{packageOutputDirectory}/{fileName}"; PatchManifestTools.SerializeToJson(filePath, patchManifest); - BuildRunner.Log($"创建补丁清单文件:{filePath}"); + BuildLogger.Log($"创建补丁清单文件:{filePath}"); } // 创建补丁清单二进制文件 @@ -86,7 +86,7 @@ namespace YooAsset.Editor string filePath = $"{packageOutputDirectory}/{fileName}"; PatchManifestTools.SerializeToBinary(filePath, patchManifest); packageHash = HashUtility.FileMD5(filePath); - BuildRunner.Log($"创建补丁清单文件:{filePath}"); + BuildLogger.Log($"创建补丁清单文件:{filePath}"); PatchManifestContext patchManifestContext = new PatchManifestContext(); byte[] bytesData = FileUtility.ReadAllBytes(filePath); @@ -99,7 +99,7 @@ namespace YooAsset.Editor string fileName = YooAssetSettingsData.GetPackageHashFileName(buildParameters.PackageName, buildParameters.PackageVersion); string filePath = $"{packageOutputDirectory}/{fileName}"; FileUtility.CreateFile(filePath, packageHash); - BuildRunner.Log($"创建补丁清单哈希文件:{filePath}"); + BuildLogger.Log($"创建补丁清单哈希文件:{filePath}"); } // 创建补丁清单版本文件 @@ -107,7 +107,7 @@ namespace YooAsset.Editor string fileName = YooAssetSettingsData.GetPackageVersionFileName(buildParameters.PackageName); string filePath = $"{packageOutputDirectory}/{fileName}"; FileUtility.CreateFile(filePath, buildParameters.PackageVersion); - BuildRunner.Log($"创建补丁清单版本文件:{filePath}"); + BuildLogger.Log($"创建补丁清单版本文件:{filePath}"); } } @@ -231,30 +231,96 @@ namespace YooAsset.Editor return result; } - /// - /// 更新资源包之间的引用关系 - /// + #region 资源包引用关系相关 + private readonly Dictionary _cachedBundleID = new Dictionary(10000); + private readonly Dictionary _cachedBundleDepends = new Dictionary(10000); + private void UpdateScriptPipelineReference(PatchManifest patchManifest, TaskBuilding_SBP.BuildResultContext buildResultContext) { + int progressValue; + int totalCount = patchManifest.BundleList.Count; + + // 缓存资源包ID + _cachedBundleID.Clear(); + progressValue = 0; foreach (var patchBundle in patchManifest.BundleList) { - patchBundle.ReferenceIDs = GetScriptPipelineRefrenceIDs(patchManifest, patchBundle, buildResultContext); - } - } - private int[] GetScriptPipelineRefrenceIDs(PatchManifest patchManifest, PatchBundle patchBundle, TaskBuilding_SBP.BuildResultContext buildResultContext) - { - if (buildResultContext.Results.BundleInfos.TryGetValue(patchBundle.BundleName, out var details) == false) - { - throw new Exception("Should never get here !"); + int bundleID = GetAssetBundleID(patchBundle.BundleName, patchManifest); + _cachedBundleID.Add(patchBundle.BundleName, bundleID); + EditorTools.DisplayProgressBar("缓存资源包索引", ++progressValue, totalCount); } + EditorTools.ClearProgressBar(); - List referenceList = new List(); - foreach (var keyValuePair in buildResultContext.Results.BundleInfos) + // 缓存资源包依赖 + _cachedBundleDepends.Clear(); + progressValue = 0; + foreach (var patchBundle in patchManifest.BundleList) { - string bundleName = keyValuePair.Key; - if (bundleName == patchBundle.BundleName) + if (buildResultContext.Results.BundleInfos.ContainsKey(patchBundle.BundleName) == false) + throw new Exception($"Not found bundle in SBP build results : {patchBundle.BundleName}"); + + var depends = buildResultContext.Results.BundleInfos[patchBundle.BundleName].Dependencies; + _cachedBundleDepends.Add(patchBundle.BundleName, depends); + EditorTools.DisplayProgressBar("缓存资源包依赖列表", ++progressValue, totalCount); + } + EditorTools.ClearProgressBar(); + + // 计算资源包引用列表 + foreach (var patchBundle in patchManifest.BundleList) + { + patchBundle.ReferenceIDs = GetBundleRefrenceIDs(patchManifest, patchBundle); + EditorTools.DisplayProgressBar("计算资源包引用关系", ++progressValue, totalCount); + } + EditorTools.ClearProgressBar(); + } + private void UpdateBuiltinPipelineReference(PatchManifest patchManifest, TaskBuilding.BuildResultContext buildResultContext) + { + int progressValue; + int totalCount = patchManifest.BundleList.Count; + + // 缓存资源包ID + _cachedBundleID.Clear(); + progressValue = 0; + foreach (var patchBundle in patchManifest.BundleList) + { + int bundleID = GetAssetBundleID(patchBundle.BundleName, patchManifest); + _cachedBundleID.Add(patchBundle.BundleName, bundleID); + EditorTools.DisplayProgressBar("缓存资源包索引", ++progressValue, totalCount); + } + EditorTools.ClearProgressBar(); + + // 缓存资源包依赖 + _cachedBundleDepends.Clear(); + progressValue = 0; + foreach (var patchBundle in patchManifest.BundleList) + { + var depends = buildResultContext.UnityManifest.GetDirectDependencies(patchBundle.BundleName); + _cachedBundleDepends.Add(patchBundle.BundleName, depends); + EditorTools.DisplayProgressBar("缓存资源包依赖列表", ++progressValue, totalCount); + } + EditorTools.ClearProgressBar(); + + // 计算资源包引用列表 + progressValue = 0; + foreach (var patchBundle in patchManifest.BundleList) + { + patchBundle.ReferenceIDs = GetBundleRefrenceIDs(patchManifest, patchBundle); + EditorTools.DisplayProgressBar("计算资源包引用关系", ++progressValue, totalCount); + } + EditorTools.ClearProgressBar(); + } + + private int[] GetBundleRefrenceIDs(PatchManifest patchManifest, PatchBundle targetBundle) + { + List referenceList = new List(); + foreach (var patchBundle in patchManifest.BundleList) + { + string bundleName = patchBundle.BundleName; + if (bundleName == targetBundle.BundleName) continue; - if (keyValuePair.Value.Dependencies.Contains(patchBundle.BundleName)) + + string[] dependencies = GetCachedBundleDepends(bundleName); + if (dependencies.Contains(targetBundle.BundleName)) { referenceList.Add(bundleName); } @@ -263,46 +329,28 @@ namespace YooAsset.Editor List result = new List(); foreach (var bundleName in referenceList) { - int bundleID = GetAssetBundleID(bundleName, patchManifest); + int bundleID = GetCachedBundleID(bundleName); if (result.Contains(bundleID) == false) result.Add(bundleID); } return result.ToArray(); } - - /// - /// 更新资源包之间的引用关系 - /// - private void UpdateBuiltinPipelineReference(PatchManifest patchManifest, TaskBuilding.BuildResultContext buildResultContext, BuildMapContext buildMapContext) + private int GetCachedBundleID(string bundleName) { - foreach (var patchBundle in patchManifest.BundleList) + if (_cachedBundleID.TryGetValue(bundleName, out int value) == false) { - patchBundle.ReferenceIDs = GetBuiltinPipelineRefrenceIDs(patchManifest, patchBundle, buildResultContext, buildMapContext); + throw new Exception($"Not found cached bundle ID : {bundleName}"); } + return value; } - private int[] GetBuiltinPipelineRefrenceIDs(PatchManifest patchManifest, PatchBundle patchBundle, TaskBuilding.BuildResultContext buildResultContext, BuildMapContext buildMapContext) + private string[] GetCachedBundleDepends(string bundleName) { - List referenceList = new List(); - foreach (var bundleInfo in buildMapContext.BundleInfos) + if (_cachedBundleDepends.TryGetValue(bundleName, out string[] value) == false) { - string bundleName = bundleInfo.BundleName; - if (bundleName == patchBundle.BundleName) - continue; - string[] dependencies = buildResultContext.UnityManifest.GetDirectDependencies(bundleName); - if (dependencies.Contains(patchBundle.BundleName)) - { - referenceList.Add(bundleName); - } + throw new Exception($"Not found cached bundle depends : {bundleName}"); } - - List result = new List(); - foreach (var bundleName in referenceList) - { - int bundleID = GetAssetBundleID(bundleName, patchManifest); - if (result.Contains(bundleID) == false) - result.Add(bundleID); - } - return result.ToArray(); + return value; } + #endregion } } \ No newline at end of file diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchPackage.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchPackage.cs index 954c73f..efdfe58 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchPackage.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchPackage.cs @@ -25,7 +25,7 @@ namespace YooAsset.Editor var buildParameters = buildParametersContext.Parameters; string pipelineOutputDirectory = buildParametersContext.GetPipelineOutputDirectory(); string packageOutputDirectory = buildParametersContext.GetPackageOutputDirectory(); - BuildRunner.Log($"开始拷贝补丁文件到补丁包目录:{packageOutputDirectory}"); + BuildLogger.Log($"开始拷贝补丁文件到补丁包目录:{packageOutputDirectory}"); if (buildParameters.BuildPipeline == EBuildPipeline.ScriptableBuildPipeline) { diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateReport.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateReport.cs index 4969c22..c81b05b 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateReport.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateReport.cs @@ -13,16 +13,12 @@ namespace YooAsset.Editor var buildParameters = context.GetContextObject(); var buildMapContext = context.GetContextObject(); var patchManifestContext = context.GetContextObject(); - buildParameters.StopWatch(); var buildMode = buildParameters.Parameters.BuildMode; if (buildMode != EBuildMode.SimulateBuild) { CreateReportFile(buildParameters, buildMapContext, patchManifestContext); } - - float buildSeconds = buildParameters.GetBuildingSeconds(); - BuildRunner.Info($"Build time consuming {buildSeconds} seconds."); } private void CreateReportFile(BuildParametersContext buildParametersContext, BuildMapContext buildMapContext, PatchManifestContext patchManifestContext) @@ -42,7 +38,7 @@ namespace YooAsset.Editor #endif buildReport.Summary.UnityVersion = UnityEngine.Application.unityVersion; buildReport.Summary.BuildDate = DateTime.Now.ToString(); - buildReport.Summary.BuildSeconds = (int)buildParametersContext.GetBuildingSeconds(); + buildReport.Summary.BuildSeconds = BuildRunner.TotalSeconds; buildReport.Summary.BuildTarget = buildParameters.BuildTarget; buildReport.Summary.BuildPipeline = buildParameters.BuildPipeline; buildReport.Summary.BuildMode = buildParameters.BuildMode; @@ -107,7 +103,7 @@ namespace YooAsset.Editor string fileName = YooAssetSettingsData.GetReportFileName(buildParameters.PackageName, buildParameters.PackageVersion); string filePath = $"{packageOutputDirectory}/{fileName}"; BuildReport.Serialize(filePath, buildReport); - BuildRunner.Log($"资源构建报告文件创建完成:{filePath}"); + BuildLogger.Log($"资源构建报告文件创建完成:{filePath}"); } /// diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskEncryption.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskEncryption.cs index 96ffe6a..8172467 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskEncryption.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskEncryption.cs @@ -56,7 +56,7 @@ namespace YooAsset.Editor FileUtility.CreateFile(filePath, encryptResult.EncryptedData); bundleInfo.EncryptedFilePath = filePath; bundleInfo.LoadMethod = encryptResult.LoadMethod; - BuildRunner.Log($"Bundle文件加密完成:{filePath}"); + BuildLogger.Log($"Bundle文件加密完成:{filePath}"); } // 进度条 diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskGetBuildMap.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskGetBuildMap.cs index 2cc5396..fb7112f 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskGetBuildMap.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskGetBuildMap.cs @@ -15,7 +15,7 @@ namespace YooAsset.Editor var buildParametersContext = context.GetContextObject(); var buildMapContext = BuildMapCreater.CreateBuildMap(buildParametersContext.Parameters.BuildMode, buildParametersContext.Parameters.PackageName); context.SetContextObject(buildMapContext); - BuildRunner.Log("构建内容准备完毕!"); + BuildLogger.Log("构建内容准备完毕!"); // 检测构建结果 CheckBuildMapContent(buildMapContext); diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskPrepare.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskPrepare.cs index f717067..6c6a752 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskPrepare.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskPrepare.cs @@ -12,8 +12,6 @@ namespace YooAsset.Editor void IBuildTask.Run(BuildContext context) { var buildParametersContext = context.GetContextObject(); - buildParametersContext.BeginWatch(); - var buildParameters = buildParametersContext.Parameters; // 检测构建参数合法性 @@ -57,7 +55,7 @@ namespace YooAsset.Editor string platformDirectory = $"{buildParameters.OutputRoot}/{buildParameters.PackageName}/{buildParameters.BuildTarget}"; if (EditorTools.DeleteDirectory(platformDirectory)) { - BuildRunner.Log($"删除平台总目录:{platformDirectory}"); + BuildLogger.Log($"删除平台总目录:{platformDirectory}"); } } @@ -65,7 +63,7 @@ namespace YooAsset.Editor string pipelineOutputDirectory = buildParametersContext.GetPipelineOutputDirectory(); if (EditorTools.CreateDirectory(pipelineOutputDirectory)) { - BuildRunner.Log($"创建输出目录:{pipelineOutputDirectory}"); + BuildLogger.Log($"创建输出目录:{pipelineOutputDirectory}"); } } } diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult.cs index 52dd554..5f101ca 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult.cs @@ -101,7 +101,7 @@ namespace YooAsset.Editor } */ - BuildRunner.Log("构建结果验证成功!"); + BuildLogger.Log("构建结果验证成功!"); } /// diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult_SBP.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult_SBP.cs index 9b52d8e..80325b4 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult_SBP.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult_SBP.cs @@ -62,7 +62,7 @@ namespace YooAsset.Editor throw new System.Exception("存在差异资源包!请查看警告信息!"); } - BuildRunner.Log("构建结果验证成功!"); + BuildLogger.Log("构建结果验证成功!"); } } } \ No newline at end of file