mirror of https://github.com/tuyoogame/YooAsset
parent
2d72d6dbc9
commit
49c242e7bc
|
@ -72,17 +72,22 @@ namespace YooAsset.Editor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private List<PatchBundle> GetAllPatchBundle(BuildContext context)
|
private List<PatchBundle> GetAllPatchBundle(BuildContext context)
|
||||||
{
|
{
|
||||||
var buildParameters = context.GetContextObject<BuildParametersContext>();
|
var buildParametersContext = context.GetContextObject<BuildParametersContext>();
|
||||||
var buildMapContext = context.GetContextObject<BuildMapContext>();
|
var buildMapContext = context.GetContextObject<BuildMapContext>();
|
||||||
var encryptionContext = context.GetContextObject<TaskEncryption.EncryptionContext>();
|
var encryptionContext = context.GetContextObject<TaskEncryption.EncryptionContext>();
|
||||||
|
|
||||||
List<PatchBundle> result = new List<PatchBundle>(1000);
|
List<PatchBundle> result = new List<PatchBundle>(1000);
|
||||||
foreach (var bundleInfo in buildMapContext.BundleInfos)
|
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;
|
var bundleName = bundleInfo.BundleName;
|
||||||
string fileHash = GetBundleFileHash(bundleInfo, buildParameters);
|
string fileHash = GetBundleFileHash(bundleInfo, buildParametersContext);
|
||||||
string fileCRC = GetBundleFileCRC(bundleInfo, buildParameters);
|
string fileCRC = GetBundleFileCRC(bundleInfo, buildParametersContext);
|
||||||
long fileSize = GetBundleFileSize(bundleInfo, buildParameters);
|
long fileSize = GetBundleFileSize(bundleInfo, buildParametersContext);
|
||||||
string[] tags = buildMapContext.GetBundleTags(bundleName);
|
string[] tags = buildMapContext.GetBundleTags(bundleName);
|
||||||
bool isEncrypted = encryptionContext.IsEncryptFile(bundleName);
|
bool isEncrypted = encryptionContext.IsEncryptFile(bundleName);
|
||||||
bool isRawFile = bundleInfo.IsRawFile;
|
bool isRawFile = bundleInfo.IsRawFile;
|
||||||
|
|
|
@ -62,6 +62,7 @@ namespace YooAsset.Editor
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. 验证Asset
|
// 4. 验证Asset
|
||||||
|
/*
|
||||||
bool isPass = true;
|
bool isPass = true;
|
||||||
var buildMode = buildParametersContext.Parameters.BuildMode;
|
var buildMode = buildParametersContext.Parameters.BuildMode;
|
||||||
if (buildMode == EBuildMode.ForceRebuild || buildMode == EBuildMode.IncrementalBuild)
|
if (buildMode == EBuildMode.ForceRebuild || buildMode == EBuildMode.IncrementalBuild)
|
||||||
|
@ -98,6 +99,7 @@ namespace YooAsset.Editor
|
||||||
throw new Exception("构建结果验证没有通过,请参考警告日志!");
|
throw new Exception("构建结果验证没有通过,请参考警告日志!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
BuildRunner.Log("构建结果验证成功!");
|
BuildRunner.Log("构建结果验证成功!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue