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