Class GameCooker
Game building service. Processes project files and outputs build game for a target platform.
Inheritance
Inherited Members
Assembly: FlaxEngine.dll
File: Editor/Cooker/GameCooker.h
Syntax
public class GameCooker
Fields
DeployFiles
Occurs when game files and data is deployed.
Declaration
public static Action DeployFiles
Field Value
|
Action
|
OnCollectAssets
Occurs when building collects assets to cook.
Declaration
public static Delegate<HashSet<Guid>> OnCollectAssets
Field Value
|
Delegate<HashSet<Guid>>
|
OnEvent
Occurs when building event rises.
Declaration
public static Delegate<EventType> OnEvent
Field Value
|
Delegate<EventType>
|
OnProgress
Occurs when building game progress fires.
Declaration
public static Delegate<String, float> OnProgress
Field Value
|
Delegate<String, float>
|
PackageFiles
Occurs when game files and data are ready to be packaged. Called only if game is about to packaged, otherwise this step is skipped.
Declaration
public static Action PackageFiles
Field Value
|
Action
|
PostProcessFiles
Occurs when game files and data are deployed and can be post-processed.
Declaration
public static Action PostProcessFiles
Field Value
|
Action
|
Methods
Build(BuildPlatform platform, BuildConfiguration configuration, const StringView& outputPath, BuildOptions options, const Array<String>& customDefines, const StringView& preset=StringView::Empty, const StringView& presetTarget=StringView::Empty)
Starts building game for the specified platform.
Declaration
public static bool Build(BuildPlatform platform, BuildConfiguration configuration, const StringView& outputPath, BuildOptions options, const Array<String>& customDefines, const StringView& preset=StringView::Empty, const StringView& presetTarget=StringView::Empty)
Parameters
|
BuildPlatform
platform
The target platform. |
|
BuildConfiguration
configuration
The build configuration. |
|
StringView
outputPath
The output path (output directory). |
|
BuildOptions
options
The build options. |
|
Array<String>
customDefines
The list of custom defines passed to the build tool when compiling project scripts. Can be used in build scripts for configuration (Configuration.CustomDefines). |
|
StringView
preset
The name of build preset used for cooking (can be used by editor and game plugins). |
|
StringView
presetTarget
The name of build preset target used for cooking (can be used by editor and game plugins). |
Returns
|
bool
True if failed to start the build, otherwise false. |
Cancel(bool waitForEnd=false)
Sends a cancel event to the game building service.
Declaration
public static void Cancel(bool waitForEnd=false)
Parameters
|
bool
waitForEnd
If set to |
GetCurrentData()
Gets the current build data. Valid only during active build process.
Declaration
public static CookingData* GetCurrentData()
Returns
|
CookingData
|
GetCurrentPlatform(PlatformType& platform, BuildPlatform& buildPlatform, BuildConfiguration& buildConfiguration)
Gets the current Editor build info (platform, configuration, etc).
Declaration
public static void GetCurrentPlatform(PlatformType& platform, BuildPlatform& buildPlatform, BuildConfiguration& buildConfiguration)
Parameters
|
PlatformType
platform
|
|
BuildPlatform
buildPlatform
|
|
BuildConfiguration
buildConfiguration
|
GetTools(BuildPlatform platform)
Gets the tools for the given platform.
Declaration
public static PlatformTools* GetTools(BuildPlatform platform)
Parameters
|
BuildPlatform
platform
The platform. |
Returns
|
PlatformTools
The platform tools implementation or null if not supported. |
IsCancelRequested()
Determines whether building cancel has been requested.
Declaration
public static bool IsCancelRequested()
Returns
|
bool
|
IsRunning()
Determines whether game building is running.
Declaration
public static bool IsRunning()
Returns
|
bool
|