Add TryGetToolchain to build platform

#631
This commit is contained in:
Wojtek Figat
2021-09-28 20:06:26 +02:00
parent 6d3170c665
commit e6ba2402b7
3 changed files with 14 additions and 4 deletions

View File

@@ -183,6 +183,16 @@ namespace Flax.Build
throw new Exception(string.Format("Platform {0} is not supported.", targetPlatform));
}
/// <summary>
/// Tries to create the build toolchain for a given architecture. Returns null if platform is not supported.
/// </summary>
/// <param name="targetArchitecture">The target architecture.</param>
/// <returns>The toolchain.</returns>
public Toolchain TryGetToolchain(TargetArchitecture targetArchitecture)
{
return HasRequiredSDKsInstalled ? GetToolchain(targetArchitecture) : null;
}
/// <summary>
/// Creates the build toolchain for a given architecture.
/// </summary>