Class GameCooker
Game building service. Processes project files and outputs build game for a target platform.
Inheritance
Namespace: FlaxEditor
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public static class GameCooker : Object
Properties
CurrentData
Gets the current build data. Valid only during active build process.
Declaration
[Unmanaged]
public static CookingData CurrentData { get; }
Property Value
IsCancelRequested
Determines whether building cancel has been requested.
Declaration
[Unmanaged]
public static bool IsCancelRequested { get; }
Property Value
System.
|
IsRunning
Determines whether game building is running.
Declaration
[Unmanaged]
public static bool IsRunning { get; }
Property Value
System.
|
Methods
add_Event(GameCooker.BuildEventDelegate)
Declaration
public static void add_Event(GameCooker.BuildEventDelegate value)
Parameters
add_Progress(GameCooker.BuildProgressDelegate)
Declaration
public static void add_Progress(GameCooker.BuildProgressDelegate value)
Parameters
Build(BuildPlatform, BuildConfiguration, String, BuildOptions, String[], String, String)
Starts building game for the specified platform.
Declaration
[Unmanaged]
public static bool Build(BuildPlatform platform, BuildConfiguration configuration, string outputPath, BuildOptions options, string[] customDefines, string preset = null, string presetTarget = null)
Parameters
Build The target platform. |
Build The build configuration. |
System. The output path (output directory). |
Build The build options. |
System. The list of custom defines passed to the build tool when compiling project scripts. Can be used in build scripts for configuration (Configuration.CustomDefines). |
System. The name of build preset used for cooking (can be used by editor and game plugins). |
System. The name of build preset target used for cooking (can be used by editor and game plugins). |
Returns
System. True if failed to start the build, otherwise false. |
Cancel(Boolean)
Sends a cancel event to the game building service.
Declaration
[Unmanaged]
public static void Cancel(bool waitForEnd = false)
Parameters
System. If set to |
GetCurrentPlatform(out PlatformType, out BuildPlatform, out BuildConfiguration)
Gets the current Editor build info (platform, configuration, etc).
Declaration
[Unmanaged]
public static void GetCurrentPlatform(out PlatformType platform, out BuildPlatform buildPlatform, out BuildConfiguration buildConfiguration)
Parameters
Platform
|
Build
|
Build
|
GetPlatformType(BuildPlatform)
Gets the type of the platform from the game build platform type.
Declaration
public static PlatformType GetPlatformType(BuildPlatform buildPlatform)
Parameters
Build The build platform. |
Returns
Platform The run-type platform type. |
remove_Event(GameCooker.BuildEventDelegate)
Declaration
public static void remove_Event(GameCooker.BuildEventDelegate value)
Parameters
remove_Progress(GameCooker.BuildProgressDelegate)
Declaration
public static void remove_Progress(GameCooker.BuildProgressDelegate value)
Parameters
Events
CollectAssets
Occurs when building collects assets to cook.
Declaration
public static event Action<List<Guid>> CollectAssets
Event Type
System.
|
DeployFiles
Occurs when game files and data is deployed.
Declaration
[Unmanaged]
public static event Action DeployFiles
Event Type
System.
|
Event
Occurs when building event rises.
Declaration
public static event GameCooker.BuildEventDelegate Event
Event Type
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
[Unmanaged]
public static event Action PackageFiles
Event Type
System.
|
PostProcessFiles
Occurs when game files and data are deployed and can be post-processed.
Declaration
[Unmanaged]
public static event Action PostProcessFiles
Event Type
System.
|
Progress
Occurs when building game progress fires.
Declaration
public static event GameCooker.BuildProgressDelegate Progress