update asset bundle builder

This commit is contained in:
hevinci
2023-03-09 10:29:14 +08:00
parent 2384921477
commit ef8a8ff497
2 changed files with 15 additions and 31 deletions
@@ -59,31 +59,6 @@ namespace YooAsset.Editor
}
}
/// <summary>
/// 获取所有的打包资源
/// </summary>
public List<BuildAssetInfo> GetAllAssets()
{
List<BuildAssetInfo> result = new List<BuildAssetInfo>(BundleInfos.Count);
foreach (var bundleInfo in BundleInfos)
{
result.AddRange(bundleInfo.BuildinAssets);
}
return result;
}
/// <summary>
/// 获取AssetBundle内构建的资源路径列表
/// </summary>
public string[] GetBuildinAssetPaths(string bundleName)
{
if (_bundleInfoDic.TryGetValue(bundleName, out BuildBundleInfo bundleInfo))
{
return bundleInfo.GetBuildinAssetPaths();
}
throw new Exception($"Not found {nameof(BuildBundleInfo)} : {bundleName}");
}
/// <summary>
/// 获取构建管线里需要的数据
/// </summary>
@@ -117,5 +92,18 @@ namespace YooAsset.Editor
}
throw new Exception($"Not found bundle : {bundleName}");
}
/// <summary>
/// 创建着色器信息类
/// </summary>
public void CreateShadersBundleInfo(string shadersBundleName)
{
if (IsContainsBundle(shadersBundleName) == false)
{
var shaderBundleInfo = new BuildBundleInfo(shadersBundleName);
BundleInfos.Add(shaderBundleInfo);
_bundleInfoDic.Add(shadersBundleName, shaderBundleInfo);
}
}
}
}