mirror of https://github.com/tuyoogame/YooAsset
perf : check build pipeline parameter type
parent
a369efa429
commit
bef90bf3b8
|
@ -8,8 +8,15 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
public BuildResult Run(BuildParameters buildParameters, bool enableLog)
|
public BuildResult Run(BuildParameters buildParameters, bool enableLog)
|
||||||
{
|
{
|
||||||
AssetBundleBuilder builder = new AssetBundleBuilder();
|
if (buildParameters is BuiltinBuildParameters)
|
||||||
return builder.Run(buildParameters, GetDefaultBuildPipeline(), enableLog);
|
{
|
||||||
|
AssetBundleBuilder builder = new AssetBundleBuilder();
|
||||||
|
return builder.Run(buildParameters, GetDefaultBuildPipeline(), enableLog);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception($"Invalid build parameter type : {buildParameters.GetType().Name}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -11,8 +11,15 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
public BuildResult Run(BuildParameters buildParameters, bool enableLog)
|
public BuildResult Run(BuildParameters buildParameters, bool enableLog)
|
||||||
{
|
{
|
||||||
AssetBundleBuilder builder = new AssetBundleBuilder();
|
if (buildParameters is RawFileBuildParameters)
|
||||||
return builder.Run(buildParameters, GetDefaultBuildPipeline(), enableLog);
|
{
|
||||||
|
AssetBundleBuilder builder = new AssetBundleBuilder();
|
||||||
|
return builder.Run(buildParameters, GetDefaultBuildPipeline(), enableLog);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception($"Invalid build parameter type : {buildParameters.GetType().Name}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -8,8 +8,15 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
public BuildResult Run(BuildParameters buildParameters, bool enableLog)
|
public BuildResult Run(BuildParameters buildParameters, bool enableLog)
|
||||||
{
|
{
|
||||||
AssetBundleBuilder builder = new AssetBundleBuilder();
|
if (buildParameters is ScriptableBuildParameters)
|
||||||
return builder.Run(buildParameters, GetDefaultBuildPipeline(), enableLog);
|
{
|
||||||
|
AssetBundleBuilder builder = new AssetBundleBuilder();
|
||||||
|
return builder.Run(buildParameters, GetDefaultBuildPipeline(), enableLog);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception($"Invalid build parameter type : {buildParameters.GetType().Name}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue