mirror of https://github.com/tuyoogame/YooAsset
style editor code
parent
688f8ec26c
commit
02ba98f120
|
@ -32,15 +32,14 @@ namespace YooAsset.Editor
|
|||
/// </summary>
|
||||
private void VerifyingBuildingResult(BuildContext context, AssetBundleManifest unityManifest)
|
||||
{
|
||||
var buildParametersContext = context.GetContextObject<BuildParametersContext>();
|
||||
var buildMapContext = context.GetContextObject<BuildMapContext>();
|
||||
string[] unityCreateBundles = unityManifest.GetAllAssetBundles();
|
||||
string[] unityBuildContent = unityManifest.GetAllAssetBundles();
|
||||
|
||||
// 1. 过滤掉原生Bundle
|
||||
string[] mapBundles = buildMapContext.Collection.Select(t => t.BundleName).ToArray();
|
||||
// 1. 计划内容
|
||||
string[] planningContent = buildMapContext.Collection.Select(t => t.BundleName).ToArray();
|
||||
|
||||
// 2. 验证Bundle
|
||||
List<string> exceptBundleList1 = unityCreateBundles.Except(mapBundles).ToList();
|
||||
// 2. 验证差异
|
||||
List<string> exceptBundleList1 = unityBuildContent.Except(planningContent).ToList();
|
||||
if (exceptBundleList1.Count > 0)
|
||||
{
|
||||
foreach (var exceptBundle in exceptBundleList1)
|
||||
|
@ -53,8 +52,8 @@ namespace YooAsset.Editor
|
|||
throw new Exception(exception);
|
||||
}
|
||||
|
||||
// 3. 验证Bundle
|
||||
List<string> exceptBundleList2 = mapBundles.Except(unityCreateBundles).ToList();
|
||||
// 3. 验证差异
|
||||
List<string> exceptBundleList2 = planningContent.Except(unityBuildContent).ToList();
|
||||
if (exceptBundleList2.Count > 0)
|
||||
{
|
||||
foreach (var exceptBundle in exceptBundleList2)
|
||||
|
|
|
@ -33,15 +33,14 @@ namespace YooAsset.Editor
|
|||
/// </summary>
|
||||
private void VerifyingBuildingResult(BuildContext context, IBundleBuildResults buildResults)
|
||||
{
|
||||
var buildParameters = context.GetContextObject<BuildParametersContext>();
|
||||
var buildMapContext = context.GetContextObject<BuildMapContext>();
|
||||
List<string> unityCreateBundles = buildResults.BundleInfos.Keys.ToList();
|
||||
List<string> unityBuildContent = buildResults.BundleInfos.Keys.ToList();
|
||||
|
||||
// 1. 过滤掉原生Bundle
|
||||
List<string> expectBundles = buildMapContext.Collection.Select(t => t.BundleName).ToList();
|
||||
// 1. 计划内容
|
||||
List<string> planningContent = buildMapContext.Collection.Select(t => t.BundleName).ToList();
|
||||
|
||||
// 2. 验证Bundle
|
||||
List<string> exceptBundleList1 = unityCreateBundles.Except(expectBundles).ToList();
|
||||
// 2. 验证差异
|
||||
List<string> exceptBundleList1 = unityBuildContent.Except(planningContent).ToList();
|
||||
if (exceptBundleList1.Count > 0)
|
||||
{
|
||||
foreach (var exceptBundle in exceptBundleList1)
|
||||
|
@ -54,8 +53,8 @@ namespace YooAsset.Editor
|
|||
throw new Exception(exception);
|
||||
}
|
||||
|
||||
// 3. 验证Bundle
|
||||
List<string> exceptBundleList2 = expectBundles.Except(unityCreateBundles).ToList();
|
||||
// 3. 验证差异
|
||||
List<string> exceptBundleList2 = planningContent.Except(unityBuildContent).ToList();
|
||||
if (exceptBundleList2.Count > 0)
|
||||
{
|
||||
foreach (var exceptBundle in exceptBundleList2)
|
||||
|
|
Loading…
Reference in New Issue