parent
34f553b9e3
commit
d448026250
|
@ -205,6 +205,7 @@ namespace YooAsset.Editor
|
||||||
throw new Exception("没有发现着色器资源包!");
|
throw new Exception("没有发现着色器资源包!");
|
||||||
|
|
||||||
// 检测依赖交集并更新依赖ID
|
// 检测依赖交集并更新依赖ID
|
||||||
|
HashSet<string> tagTemps = new HashSet<string>();
|
||||||
foreach (var packageAsset in manifest.AssetList)
|
foreach (var packageAsset in manifest.AssetList)
|
||||||
{
|
{
|
||||||
List<string> dependBundles = GetPackageAssetAllDependBundles(manifest, packageAsset);
|
List<string> dependBundles = GetPackageAssetAllDependBundles(manifest, packageAsset);
|
||||||
|
@ -215,9 +216,24 @@ namespace YooAsset.Editor
|
||||||
if (newDependIDs.Contains(shaderBundleId) == false)
|
if (newDependIDs.Contains(shaderBundleId) == false)
|
||||||
newDependIDs.Add(shaderBundleId);
|
newDependIDs.Add(shaderBundleId);
|
||||||
packageAsset.DependIDs = newDependIDs.ToArray();
|
packageAsset.DependIDs = newDependIDs.ToArray();
|
||||||
|
foreach (var tag in packageAsset.AssetTags)
|
||||||
|
{
|
||||||
|
if (tagTemps.Contains(tag) == false)
|
||||||
|
tagTemps.Add(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新资源包标签
|
||||||
|
var packageBundle = manifest.BundleList[shaderBundleId];
|
||||||
|
List<string> newTags = new List<string>(packageBundle.Tags);
|
||||||
|
foreach (var tag in tagTemps)
|
||||||
|
{
|
||||||
|
if (newTags.Contains(tag) == false)
|
||||||
|
newTags.Add(tag);
|
||||||
|
}
|
||||||
|
packageBundle.Tags = newTags.ToArray();
|
||||||
|
}
|
||||||
private List<string> GetPackageAssetAllDependBundles(PackageManifest manifest, PackageAsset packageAsset)
|
private List<string> GetPackageAssetAllDependBundles(PackageManifest manifest, PackageAsset packageAsset)
|
||||||
{
|
{
|
||||||
List<string> result = new List<string>();
|
List<string> result = new List<string>();
|
||||||
|
@ -302,7 +318,7 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
if (packageBundle.IsRawFile)
|
if (packageBundle.IsRawFile)
|
||||||
{
|
{
|
||||||
_cachedBundleDepends.Add(packageBundle.BundleName, new string[] { } );
|
_cachedBundleDepends.Add(packageBundle.BundleName, new string[] { });
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue