Cleanup code #1215 and add cook game icon
This commit is contained in:
@@ -110,14 +110,14 @@ namespace FlaxEditor.Windows
|
||||
#if PLATFORM_WINDOWS
|
||||
switch (BuildPlatform)
|
||||
{
|
||||
case BuildPlatform.MacOSx64:
|
||||
case BuildPlatform.MacOSARM64:
|
||||
case BuildPlatform.iOSARM64:
|
||||
IsSupported = false;
|
||||
break;
|
||||
default:
|
||||
IsSupported = true;
|
||||
break;
|
||||
case BuildPlatform.MacOSx64:
|
||||
case BuildPlatform.MacOSARM64:
|
||||
case BuildPlatform.iOSARM64:
|
||||
IsSupported = false;
|
||||
break;
|
||||
default:
|
||||
IsSupported = true;
|
||||
break;
|
||||
}
|
||||
#elif PLATFORM_LINUX
|
||||
switch (BuildPlatform)
|
||||
@@ -160,17 +160,17 @@ namespace FlaxEditor.Windows
|
||||
{
|
||||
switch (BuildPlatform)
|
||||
{
|
||||
case BuildPlatform.Windows32:
|
||||
case BuildPlatform.Windows64:
|
||||
case BuildPlatform.UWPx86:
|
||||
case BuildPlatform.UWPx64:
|
||||
case BuildPlatform.LinuxX64:
|
||||
case BuildPlatform.AndroidARM64:
|
||||
layout.Label("Use Flax Launcher and download the required package.", TextAlignment.Center);
|
||||
break;
|
||||
default:
|
||||
layout.Label("Engine source is required to target this platform.", TextAlignment.Center);
|
||||
break;
|
||||
case BuildPlatform.Windows32:
|
||||
case BuildPlatform.Windows64:
|
||||
case BuildPlatform.UWPx86:
|
||||
case BuildPlatform.UWPx64:
|
||||
case BuildPlatform.LinuxX64:
|
||||
case BuildPlatform.AndroidARM64:
|
||||
layout.Label("Use Flax Launcher and download the required package.", TextAlignment.Center);
|
||||
break;
|
||||
default:
|
||||
layout.Label("Engine source is required to target this platform.", TextAlignment.Center);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -238,6 +238,7 @@ namespace FlaxEditor.Windows
|
||||
{
|
||||
[EditorDisplay(null, "arm64")]
|
||||
ARM64,
|
||||
|
||||
[EditorDisplay(null, "x64")]
|
||||
x64,
|
||||
}
|
||||
@@ -272,43 +273,43 @@ namespace FlaxEditor.Windows
|
||||
string name;
|
||||
switch (_platform)
|
||||
{
|
||||
case PlatformType.Windows:
|
||||
name = "Windows";
|
||||
break;
|
||||
case PlatformType.XboxOne:
|
||||
name = "Xbox One";
|
||||
break;
|
||||
case PlatformType.UWP:
|
||||
name = "Windows Store";
|
||||
layout.Label("UWP (Windows Store) platform has been deprecated and is no longer supported", TextAlignment.Center).Label.TextColor = Color.Red;
|
||||
break;
|
||||
case PlatformType.Linux:
|
||||
name = "Linux";
|
||||
break;
|
||||
case PlatformType.PS4:
|
||||
name = "PlayStation 4";
|
||||
break;
|
||||
case PlatformType.XboxScarlett:
|
||||
name = "Xbox Scarlett";
|
||||
break;
|
||||
case PlatformType.Android:
|
||||
name = "Android";
|
||||
break;
|
||||
case PlatformType.Switch:
|
||||
name = "Switch";
|
||||
break;
|
||||
case PlatformType.PS5:
|
||||
name = "PlayStation 5";
|
||||
break;
|
||||
case PlatformType.Mac:
|
||||
name = "Mac";
|
||||
break;
|
||||
case PlatformType.iOS:
|
||||
name = "iOS";
|
||||
break;
|
||||
default:
|
||||
name = Utilities.Utils.GetPropertyNameUI(_platform.ToString());
|
||||
break;
|
||||
case PlatformType.Windows:
|
||||
name = "Windows";
|
||||
break;
|
||||
case PlatformType.XboxOne:
|
||||
name = "Xbox One";
|
||||
break;
|
||||
case PlatformType.UWP:
|
||||
name = "Windows Store";
|
||||
layout.Label("UWP (Windows Store) platform has been deprecated and is no longer supported", TextAlignment.Center).Label.TextColor = Color.Red;
|
||||
break;
|
||||
case PlatformType.Linux:
|
||||
name = "Linux";
|
||||
break;
|
||||
case PlatformType.PS4:
|
||||
name = "PlayStation 4";
|
||||
break;
|
||||
case PlatformType.XboxScarlett:
|
||||
name = "Xbox Scarlett";
|
||||
break;
|
||||
case PlatformType.Android:
|
||||
name = "Android";
|
||||
break;
|
||||
case PlatformType.Switch:
|
||||
name = "Switch";
|
||||
break;
|
||||
case PlatformType.PS5:
|
||||
name = "PlayStation 5";
|
||||
break;
|
||||
case PlatformType.Mac:
|
||||
name = "Mac";
|
||||
break;
|
||||
case PlatformType.iOS:
|
||||
name = "iOS";
|
||||
break;
|
||||
default:
|
||||
name = Utilities.Utils.GetPropertyNameUI(_platform.ToString());
|
||||
break;
|
||||
}
|
||||
var group = layout.Group(name);
|
||||
|
||||
@@ -614,6 +615,18 @@ namespace FlaxEditor.Windows
|
||||
_exitOnBuildEnd = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if can build for the given platform (both supported and available).
|
||||
/// </summary>
|
||||
/// <param name="platformType">The platform.</param>
|
||||
/// <returns>True if can build, otherwise false.</returns>
|
||||
public bool CanBuild(PlatformType platformType)
|
||||
{
|
||||
if (_buildTabProxy.PerPlatformOptions.TryGetValue(platformType, out var platform))
|
||||
return platform.IsAvailable && platform.IsSupported;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds all the targets from the given preset.
|
||||
/// </summary>
|
||||
@@ -660,11 +673,11 @@ namespace FlaxEditor.Windows
|
||||
Editor.Log("Building and running");
|
||||
GameCooker.GetCurrentPlatform(out var platform, out var buildPlatform, out var buildConfiguration);
|
||||
var numberOfClients = Editor.Options.Options.Interface.NumberOfGameClientsToLaunch;
|
||||
|
||||
for (int i = 0; i < numberOfClients; i++)
|
||||
{
|
||||
var buildOptions = BuildOptions.AutoRun;
|
||||
if (i > 0) buildOptions |= BuildOptions.NoCook;
|
||||
if (i > 0)
|
||||
buildOptions |= BuildOptions.NoCook;
|
||||
|
||||
_buildingQueue.Enqueue(new QueueItem
|
||||
{
|
||||
@@ -687,7 +700,6 @@ namespace FlaxEditor.Windows
|
||||
Editor.Log("Running cooked build");
|
||||
GameCooker.GetCurrentPlatform(out var platform, out var buildPlatform, out var buildConfiguration);
|
||||
var numberOfClients = Editor.Options.Options.Interface.NumberOfGameClientsToLaunch;
|
||||
|
||||
for (int i = 0; i < numberOfClients; i++)
|
||||
{
|
||||
_buildingQueue.Enqueue(new QueueItem
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace FlaxEditor.Windows.Profiler
|
||||
_liveRecordingButton = toolstrip.AddButton(editor.Icons.Play64);
|
||||
_liveRecordingButton.LinkTooltip("Live profiling events recording");
|
||||
_liveRecordingButton.AutoCheck = true;
|
||||
_liveRecordingButton.PrimaryClicked += () => _liveRecordingButton.Icon = LiveRecording ? editor.Icons.Stop64 : editor.Icons.Play64;
|
||||
_liveRecordingButton.Clicked += () => _liveRecordingButton.Icon = LiveRecording ? editor.Icons.Stop64 : editor.Icons.Play64;
|
||||
_clearButton = toolstrip.AddButton(editor.Icons.Rotate32, Clear);
|
||||
_clearButton.LinkTooltip("Clear data");
|
||||
toolstrip.AddSeparator();
|
||||
|
||||
Reference in New Issue
Block a user