diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParameters.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParameters.cs
index 321ed84..6b47e1e 100644
--- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParameters.cs
+++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParameters.cs
@@ -18,6 +18,16 @@ namespace YooAsset.Editor
/// 生成代码防裁剪配置
///
public bool WriteLinkXML = true;
+
+ ///
+ /// 缓存服务器地址
+ ///
+ public string CacheServerHost;
+
+ ///
+ /// 缓存服务器端口
+ ///
+ public int CacheServerPort;
}
///
diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParametersContext.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParametersContext.cs
index f856237..175d281 100644
--- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParametersContext.cs
+++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildParametersContext.cs
@@ -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;