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
@@ -40,17 +40,13 @@ namespace YooAsset.Editor
throw new Exception($"构建过程中发生错误 : {exitCode}");
}
// 着色器适配
// 创建着色器信息
// 说明:解决因为着色器资源包导致验证失败。
// 例如:当项目里没有着色器,如果有依赖内置着色器就会验证失败。
string shadersBundleName = buildMapContext.ShadersBundleName;
if (buildResults.BundleInfos.ContainsKey(shadersBundleName))
{
if (buildMapContext.IsContainsBundle(shadersBundleName) == false)
{
var shaderBundleInfo = new BuildBundleInfo(shadersBundleName);
buildMapContext.BundleInfos.Add(shaderBundleInfo);
}
buildMapContext.CreateShadersBundleInfo(shadersBundleName);
}
BuildLogger.Log("Unity引擎打包成功!");