Merge branch 'cookandrun-buildconfig' of https://github.com/Tryibion/FlaxEngine into Tryibion-cookandrun-buildconfig
This commit is contained in:
@@ -421,6 +421,12 @@ namespace FlaxEditor.Options
|
|||||||
[EditorDisplay("Cook & Run"), EditorOrder(600)]
|
[EditorDisplay("Cook & Run"), EditorOrder(600)]
|
||||||
public int NumberOfGameClientsToLaunch = 1;
|
public int NumberOfGameClientsToLaunch = 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the build configuration to use when using Cook and Run option in the editor.
|
||||||
|
/// </summary>
|
||||||
|
[EditorDisplay("Cook & Run"), EditorOrder(601), ExpandGroups, Tooltip("The build configuration to use when using Cook and Run option in the editor.")]
|
||||||
|
public BuildConfiguration CookAndRunBuildConfiguration { get; set; } = BuildConfiguration.Development;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the curvature of the line connecting to connected visject nodes.
|
/// Gets or sets the curvature of the line connecting to connected visject nodes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -974,8 +974,9 @@ namespace FlaxEditor.Windows
|
|||||||
public void BuildAndRun()
|
public void BuildAndRun()
|
||||||
{
|
{
|
||||||
Editor.Log("Building and running");
|
Editor.Log("Building and running");
|
||||||
GameCooker.GetCurrentPlatform(out var platform, out var buildPlatform, out var buildConfiguration);
|
GameCooker.GetCurrentPlatform(out var platform, out var buildPlatform, out _);
|
||||||
var numberOfClients = Editor.Options.Options.Interface.NumberOfGameClientsToLaunch;
|
var numberOfClients = Editor.Options.Options.Interface.NumberOfGameClientsToLaunch;
|
||||||
|
var buildConfig = Editor.Options.Options.Interface.CookAndRunBuildConfiguration;
|
||||||
for (int i = 0; i < numberOfClients; i++)
|
for (int i = 0; i < numberOfClients; i++)
|
||||||
{
|
{
|
||||||
var buildOptions = BuildOptions.AutoRun;
|
var buildOptions = BuildOptions.AutoRun;
|
||||||
@@ -988,7 +989,7 @@ namespace FlaxEditor.Windows
|
|||||||
{
|
{
|
||||||
Output = _buildTabProxy.PerPlatformOptions[platform].Output,
|
Output = _buildTabProxy.PerPlatformOptions[platform].Output,
|
||||||
Platform = buildPlatform,
|
Platform = buildPlatform,
|
||||||
Mode = buildConfiguration,
|
Mode = buildConfig,
|
||||||
},
|
},
|
||||||
Options = buildOptions,
|
Options = buildOptions,
|
||||||
});
|
});
|
||||||
@@ -1001,8 +1002,9 @@ namespace FlaxEditor.Windows
|
|||||||
public void RunCooked()
|
public void RunCooked()
|
||||||
{
|
{
|
||||||
Editor.Log("Running cooked build");
|
Editor.Log("Running cooked build");
|
||||||
GameCooker.GetCurrentPlatform(out var platform, out var buildPlatform, out var buildConfiguration);
|
GameCooker.GetCurrentPlatform(out var platform, out var buildPlatform, out _);
|
||||||
var numberOfClients = Editor.Options.Options.Interface.NumberOfGameClientsToLaunch;
|
var numberOfClients = Editor.Options.Options.Interface.NumberOfGameClientsToLaunch;
|
||||||
|
var buildConfig = Editor.Options.Options.Interface.CookAndRunBuildConfiguration;
|
||||||
for (int i = 0; i < numberOfClients; i++)
|
for (int i = 0; i < numberOfClients; i++)
|
||||||
{
|
{
|
||||||
_buildingQueue.Enqueue(new QueueItem
|
_buildingQueue.Enqueue(new QueueItem
|
||||||
@@ -1011,7 +1013,7 @@ namespace FlaxEditor.Windows
|
|||||||
{
|
{
|
||||||
Output = _buildTabProxy.PerPlatformOptions[platform].Output,
|
Output = _buildTabProxy.PerPlatformOptions[platform].Output,
|
||||||
Platform = buildPlatform,
|
Platform = buildPlatform,
|
||||||
Mode = buildConfiguration,
|
Mode = buildConfig,
|
||||||
},
|
},
|
||||||
Options = BuildOptions.AutoRun | BuildOptions.NoCook,
|
Options = BuildOptions.AutoRun | BuildOptions.NoCook,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user