diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs index 5bba327..6866388 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs @@ -72,17 +72,22 @@ namespace YooAsset.Editor /// private List GetAllPatchBundle(BuildContext context) { - var buildParameters = context.GetContextObject(); + var buildParametersContext = context.GetContextObject(); var buildMapContext = context.GetContextObject(); var encryptionContext = context.GetContextObject(); List result = new List(1000); foreach (var bundleInfo in buildMapContext.BundleInfos) { + // NOTE:检测路径长度不要超过260字符。 + string filePath = $"{buildParametersContext.GetPipelineOutputDirectory()}/{bundleInfo.BundleName}"; + if(filePath.Length >= 260) + throw new Exception($"The output bundle name is too long {filePath.Length} chars : {filePath}"); + var bundleName = bundleInfo.BundleName; - string fileHash = GetBundleFileHash(bundleInfo, buildParameters); - string fileCRC = GetBundleFileCRC(bundleInfo, buildParameters); - long fileSize = GetBundleFileSize(bundleInfo, buildParameters); + string fileHash = GetBundleFileHash(bundleInfo, buildParametersContext); + string fileCRC = GetBundleFileCRC(bundleInfo, buildParametersContext); + long fileSize = GetBundleFileSize(bundleInfo, buildParametersContext); string[] tags = buildMapContext.GetBundleTags(bundleName); bool isEncrypted = encryptionContext.IsEncryptFile(bundleName); bool isRawFile = bundleInfo.IsRawFile; diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult.cs index 1623942..52dd554 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskVerifyBuildResult.cs @@ -62,6 +62,7 @@ namespace YooAsset.Editor } // 4. 验证Asset + /* bool isPass = true; var buildMode = buildParametersContext.Parameters.BuildMode; if (buildMode == EBuildMode.ForceRebuild || buildMode == EBuildMode.IncrementalBuild) @@ -98,6 +99,7 @@ namespace YooAsset.Editor throw new Exception("构建结果验证没有通过,请参考警告日志!"); } } + */ BuildRunner.Log("构建结果验证成功!"); }