Update AssetBundleBuilder
parent
188957ee91
commit
d6e3da322b
|
@ -14,6 +14,8 @@ namespace YooAsset.Editor
|
|||
var buildParameters = context.GetContextObject<BuildParametersContext>();
|
||||
buildParameters.BeginWatch();
|
||||
|
||||
var buildMode = buildParameters.Parameters.BuildMode;
|
||||
|
||||
// 检测构建平台是否合法
|
||||
if (buildParameters.Parameters.BuildTarget == BuildTarget.NoTarget)
|
||||
throw new Exception("请选择目标平台");
|
||||
|
@ -26,6 +28,8 @@ namespace YooAsset.Editor
|
|||
if (string.IsNullOrEmpty(buildParameters.PipelineOutputDirectory))
|
||||
throw new Exception("输出目录不能为空");
|
||||
|
||||
if (buildMode != EBuildMode.SimulateBuild)
|
||||
{
|
||||
// 检测当前是否正在构建资源包
|
||||
if (BuildPipeline.isBuildingPlayer)
|
||||
throw new Exception("当前正在构建资源包,请结束后再试");
|
||||
|
@ -36,9 +40,9 @@ namespace YooAsset.Editor
|
|||
|
||||
// 保存改动的资源
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
|
||||
// 增量更新时候的必要检测
|
||||
var buildMode = buildParameters.Parameters.BuildMode;
|
||||
if (buildMode == EBuildMode.IncrementalBuild)
|
||||
{
|
||||
// 检测历史版本是否存在
|
||||
|
|
Loading…
Reference in New Issue