parent
3882fe9f3f
commit
02b9b689b7
|
@ -20,13 +20,19 @@ namespace YooAsset.Editor
|
|||
|
||||
// 检测构建参数是否为空
|
||||
if (buildParameters == null)
|
||||
{
|
||||
throw new Exception($"{nameof(buildParameters)} is null !");
|
||||
}
|
||||
|
||||
// 检测可编程构建管线参数
|
||||
if (buildParameters.BuildPipeline == EBuildPipeline.ScriptableBuildPipeline)
|
||||
{
|
||||
if (buildParameters.SBPParameters == null)
|
||||
throw new Exception($"{nameof(BuildParameters.SBPParameters)} is null !");
|
||||
|
||||
if (buildParameters.BuildMode == EBuildMode.DryRunBuild)
|
||||
throw new Exception($"{nameof(EBuildPipeline.ScriptableBuildPipeline)} not support {nameof(EBuildMode.DryRunBuild)} build mode !");
|
||||
|
||||
if (buildParameters.BuildMode == EBuildMode.ForceRebuild)
|
||||
throw new Exception($"{nameof(EBuildPipeline.ScriptableBuildPipeline)} not support {nameof(EBuildMode.ForceRebuild)} build mode !");
|
||||
}
|
||||
|
||||
// 构建参数
|
||||
|
|
|
@ -85,9 +85,6 @@ namespace YooAsset.Editor
|
|||
if (Parameters.BuildMode == EBuildMode.SimulateBuild)
|
||||
throw new Exception("Should never get here !");
|
||||
|
||||
if (Parameters.BuildMode == EBuildMode.DryRunBuild)
|
||||
throw new Exception($"SBP not support {nameof(EBuildMode.DryRunBuild)} build mode !");
|
||||
|
||||
var targetGroup = BuildPipeline.GetBuildTargetGroup(Parameters.BuildTarget);
|
||||
var buildParams = new UnityEditor.Build.Pipeline.BundleBuildParameters(Parameters.BuildTarget, targetGroup, PipelineOutputDirectory);
|
||||
|
||||
|
@ -103,16 +100,9 @@ namespace YooAsset.Editor
|
|||
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.UseCache = true;
|
||||
buildParams.CacheServerHost = Parameters.SBPParameters.CacheServerHost;
|
||||
buildParams.CacheServerPort = Parameters.SBPParameters.CacheServerPort;
|
||||
buildParams.WriteLinkXML = Parameters.SBPParameters.WriteLinkXML;
|
||||
|
||||
return buildParams;
|
||||
|
|
Loading…
Reference in New Issue