Update ShaderVariantCollector
parent
3aa46664f7
commit
2fb77c1bf8
|
@ -87,9 +87,14 @@ namespace YooAsset.Editor
|
||||||
List<string> allAssets = new List<string>(1000);
|
List<string> allAssets = new List<string>(1000);
|
||||||
|
|
||||||
// 获取所有打包的资源
|
// 获取所有打包的资源
|
||||||
List<CollectAssetInfo> allCollectInfos = AssetBundleCollectorSettingData.Setting.GetAllPackageAssets(EBuildMode.DryRunBuild);
|
List<CollectAssetInfo> allCollectAssetInfos = new List<CollectAssetInfo>();
|
||||||
List<string> collectAssets = allCollectInfos.Select(t => t.AssetPath).ToList();
|
List<CollectResult> collectResults = AssetBundleCollectorSettingData.Setting.GetAllPackageAssets(EBuildMode.DryRunBuild);
|
||||||
foreach (var assetPath in collectAssets)
|
foreach (var collectResult in collectResults)
|
||||||
|
{
|
||||||
|
allCollectAssetInfos.AddRange(collectResult.CollectAssets);
|
||||||
|
}
|
||||||
|
List<string> allAssetPath = allCollectAssetInfos.Select(t => t.AssetPath).ToList();
|
||||||
|
foreach (var assetPath in allAssetPath)
|
||||||
{
|
{
|
||||||
string[] depends = AssetDatabase.GetDependencies(assetPath, true);
|
string[] depends = AssetDatabase.GetDependencies(assetPath, true);
|
||||||
foreach (var depend in depends)
|
foreach (var depend in depends)
|
||||||
|
@ -97,7 +102,7 @@ namespace YooAsset.Editor
|
||||||
if (allAssets.Contains(depend) == false)
|
if (allAssets.Contains(depend) == false)
|
||||||
allAssets.Add(depend);
|
allAssets.Add(depend);
|
||||||
}
|
}
|
||||||
EditorTools.DisplayProgressBar("获取所有打包资源", ++progressValue, collectAssets.Count);
|
EditorTools.DisplayProgressBar("获取所有打包资源", ++progressValue, allAssetPath.Count);
|
||||||
}
|
}
|
||||||
EditorTools.ClearProgressBar();
|
EditorTools.ClearProgressBar();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue