update asset bundle builder

pull/86/head
hevinci 2023-03-22 09:43:28 +08:00
parent 1877a373d6
commit 58a40ad1d1
1 changed files with 5 additions and 5 deletions

View File

@ -17,13 +17,13 @@ namespace YooAsset.Editor
string packageOutputDirectory = buildParametersContext.GetPackageOutputDirectory(); string packageOutputDirectory = buildParametersContext.GetPackageOutputDirectory();
int outputNameStyle = (int)buildParametersContext.Parameters.OutputNameStyle; int outputNameStyle = (int)buildParametersContext.Parameters.OutputNameStyle;
// 1.检测路径长度 // 1.检测文件名长度
foreach (var bundleInfo in buildMapContext.Collection) foreach (var bundleInfo in buildMapContext.Collection)
{ {
// NOTE检测路径长度不要超过260字符。 // NOTE检测文件名长度不要超过260字符。
string filePath = $"{pipelineOutputDirectory}/{bundleInfo.BundleName}"; string fileName = bundleInfo.BundleName;
if (filePath.Length >= 260) if (fileName.Length >= 260)
throw new Exception($"The output bundle name is too long {filePath.Length} chars : {filePath}"); throw new Exception($"The output bundle name is too long {fileName.Length} chars : {fileName}");
} }
// 2.更新构建输出的文件路径 // 2.更新构建输出的文件路径