mirror of https://github.com/tuyoogame/YooAsset
perf : check build pipeline parameter type
parent
a369efa429
commit
bef90bf3b8
|
@ -7,10 +7,17 @@ namespace YooAsset.Editor
|
|||
public class BuiltinBuildPipeline : IBuildPipeline
|
||||
{
|
||||
public BuildResult Run(BuildParameters buildParameters, bool enableLog)
|
||||
{
|
||||
if (buildParameters is BuiltinBuildParameters)
|
||||
{
|
||||
AssetBundleBuilder builder = new AssetBundleBuilder();
|
||||
return builder.Run(buildParameters, GetDefaultBuildPipeline(), enableLog);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"Invalid build parameter type : {buildParameters.GetType().Name}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取默认的构建流程
|
||||
|
|
|
@ -10,10 +10,17 @@ namespace YooAsset.Editor
|
|||
public class RawFileBuildPipeline : IBuildPipeline
|
||||
{
|
||||
public BuildResult Run(BuildParameters buildParameters, bool enableLog)
|
||||
{
|
||||
if (buildParameters is RawFileBuildParameters)
|
||||
{
|
||||
AssetBundleBuilder builder = new AssetBundleBuilder();
|
||||
return builder.Run(buildParameters, GetDefaultBuildPipeline(), enableLog);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"Invalid build parameter type : {buildParameters.GetType().Name}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取默认的构建流程
|
||||
|
|
|
@ -7,10 +7,17 @@ namespace YooAsset.Editor
|
|||
public class ScriptableBuildPipeline : IBuildPipeline
|
||||
{
|
||||
public BuildResult Run(BuildParameters buildParameters, bool enableLog)
|
||||
{
|
||||
if (buildParameters is ScriptableBuildParameters)
|
||||
{
|
||||
AssetBundleBuilder builder = new AssetBundleBuilder();
|
||||
return builder.Run(buildParameters, GetDefaultBuildPipeline(), enableLog);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"Invalid build parameter type : {buildParameters.GetType().Name}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取默认的构建流程
|
||||
|
|
Loading…
Reference in New Issue