Update SimulateBuild

pull/51/head
hevinci 2022-10-17 14:53:22 +08:00
parent bd11f2e7b8
commit b4c190efb7
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ namespace YooAsset.Editor
/// <summary> /// <summary>
/// 模拟构建 /// 模拟构建
/// </summary> /// </summary>
public static string SimulateBuild(string packageName, bool enableAddressable) public static string SimulateBuild(string packageName)
{ {
string defaultOutputRoot = AssetBundleBuilderHelper.GetDefaultOutputRoot(); string defaultOutputRoot = AssetBundleBuilderHelper.GetDefaultOutputRoot();
BuildParameters buildParameters = new BuildParameters(); BuildParameters buildParameters = new BuildParameters();
@ -15,7 +15,7 @@ namespace YooAsset.Editor
buildParameters.BuildTarget = EditorUserBuildSettings.activeBuildTarget; buildParameters.BuildTarget = EditorUserBuildSettings.activeBuildTarget;
buildParameters.BuildMode = EBuildMode.SimulateBuild; buildParameters.BuildMode = EBuildMode.SimulateBuild;
buildParameters.BuildPackage = packageName; buildParameters.BuildPackage = packageName;
buildParameters.EnableAddressable = enableAddressable; buildParameters.EnableAddressable = AssetBundleCollectorSettingData.Setting.EnableAddressable;
AssetBundleBuilder builder = new AssetBundleBuilder(); AssetBundleBuilder builder = new AssetBundleBuilder();
var buildResult = builder.Run(buildParameters); var buildResult = builder.Run(buildParameters);

View File

@ -10,12 +10,12 @@ namespace YooAsset
/// <summary> /// <summary>
/// 编辑器下模拟构建补丁清单 /// 编辑器下模拟构建补丁清单
/// </summary> /// </summary>
public static string SimulateBuild(string packageName, bool enableAddressable) public static string SimulateBuild(string packageName)
{ {
if (_classType == null) if (_classType == null)
_classType = Assembly.Load("YooAsset.Editor").GetType("YooAsset.Editor.AssetBundleSimulateBuilder"); _classType = Assembly.Load("YooAsset.Editor").GetType("YooAsset.Editor.AssetBundleSimulateBuilder");
string manifestFilePath = (string)InvokePublicStaticMethod(_classType, "SimulateBuild", packageName, enableAddressable); string manifestFilePath = (string)InvokePublicStaticMethod(_classType, "SimulateBuild", packageName);
return manifestFilePath; return manifestFilePath;
} }