Update AssetBundleBuilder

SBP构建参数增加了缓存服务器的地址和端口
pull/28/head
hevinci 2022-07-22 12:56:22 +08:00
parent 2d5854ed58
commit 41761f0a97
2 changed files with 20 additions and 2 deletions

View File

@ -18,6 +18,16 @@ namespace YooAsset.Editor
/// 生成代码防裁剪配置
/// </summary>
public bool WriteLinkXML = true;
/// <summary>
/// 缓存服务器地址
/// </summary>
public string CacheServerHost;
/// <summary>
/// 缓存服务器端口
/// </summary>
public int CacheServerPort;
}
/// <summary>

View File

@ -100,11 +100,19 @@ namespace YooAsset.Editor
else
throw new System.NotImplementedException(Parameters.CompressOption.ToString());
if (Parameters.BuildMode == EBuildMode.ForceRebuild)
buildParams.UseCache = false;
if (Parameters.DisableWriteTypeTree)
buildParams.ContentBuildFlags |= UnityEditor.Build.Content.ContentBuildFlags.DisableWriteTypeTree;
if(Parameters.BuildMode == EBuildMode.ForceRebuild)
{
buildParams.UseCache = false;
}
else
{
buildParams.UseCache = true;
buildParams.CacheServerHost = Parameters.SBPParameters.CacheServerHost;
buildParams.CacheServerPort = Parameters.SBPParameters.CacheServerPort;
}
buildParams.WriteLinkXML = Parameters.SBPParameters.WriteLinkXML;
return buildParams;