public static void BuildPackage() { //1. 解析命令行参数 ParseCommandLineArgs(); //2. 修改打包参数 bool cancel = false; BuildTargetGroup targetGroup = BuildPipelineCommonTools.BuildUtils.GetBuildTargetGroup(mBatchBuildTargetString); BuildTarget target = BuildPipelineCommonTools.BuildUtils.GetBuildTarget(targetGroup); if (!BuildPipelineValidator.CheckSupportedTarget(targetGroup, target)) { return; } if (cancel) { Debug.LogWarning("Build canceled (not enough information)"); return; } ProjectBuildPresetSettings buildPresetSettings = new ProjectBuildPresetSettings() { buildTarget = target, bundleVersionCode = mBatchBuildNumber, version = mBatchBundleVersion, overrideBuildPath = true, buildPath = mBatchBuildPath, overrideExecutableName = true, executableName = mBatchExecutableName, }; //3. 执行打包逻辑 BuildPipelineExecutor.Build(buildPresetSettings); }
public void BuildPackages() { Current.Save(); if (!CheckBatchBuild()) { Debug.LogError("当前无打包配置或者未选中需要打包的配置, 请检查后重新尝试"); return; } foreach (var setting in Current.Settings) { if (setting.buildApplication) { BuildPipelineExecutor.Build(setting); } } }
public void BuildPackage() { ProjectBuildConfigure.Current.Save(); BuildPipelineExecutor.Build(this); }