Add deprecation attributes to old UWP platform

This commit is contained in:
2026-09-30 22:03:48 +02:00
parent f78a70e1cd
commit 6c5321d225
6 changed files with 28 additions and 3 deletions
+4 -2
View File
@@ -67,14 +67,16 @@ API_ENUM() enum class BuildPlatform
/// <summary>
/// Universal Windows Platform (UWP) (x86 architecture)
/// [Deprecated and unsupported platform]
/// </summary>
API_ENUM(Attributes="EditorDisplay(null, \"Windows Store x86\")")
API_ENUM(Attributes="EditorDisplay(null, \"Windows Store x86\"), Obsolete")
UWPx86 = 3,
/// <summary>
/// Universal Windows Platform (UWP) (x64 architecture)
/// [Deprecated and unsupported platform]
/// </summary>
API_ENUM(Attributes="EditorDisplay(null, \"Windows Store x64\")")
API_ENUM(Attributes="EditorDisplay(null, \"Windows Store x64\"), Obsolete")
UWPx64 = 4,
/// <summary>
+2
View File
@@ -94,8 +94,10 @@ namespace FlaxEditor
{
case BuildPlatform.Windows32:
case BuildPlatform.Windows64: return PlatformType.Windows;
#pragma warning disable CS0612
case BuildPlatform.UWPx86:
case BuildPlatform.UWPx64: return PlatformType.UWP;
#pragma warning restore CS0612
case BuildPlatform.XboxOne: return PlatformType.XboxOne;
case BuildPlatform.LinuxX64: return PlatformType.Linux;
case BuildPlatform.PS4: return PlatformType.PS4;
+10
View File
@@ -1479,6 +1479,16 @@ namespace FlaxEditor
if (preset == null)
{
Editor.LogWarning("Missing preset.");
if (settings.Presets != null)
{
Editor.LogWarning("Available presets:");
foreach (var p in settings.Presets)
{
Editor.LogWarning($" > {p.Name}");
foreach (var t in p.Targets)
Editor.LogWarning($" * {t.Name} ({t.Platform}, {t.Mode})");
}
}
return true;
}
+2
View File
@@ -84,7 +84,9 @@ namespace FlaxEditor.GUI
{
new PlatformData(PlatformType.Windows, icons.WindowsIcon128, "Windows"),
new PlatformData(PlatformType.XboxOne, icons.XBoxOne128, "Xbox One"),
#pragma warning disable CS0612
new PlatformData(PlatformType.UWP, icons.UWPStore128, "Windows Store"),
#pragma warning restore CS0612
new PlatformData(PlatformType.Linux, icons.LinuxIcon128, "Linux"),
new PlatformData(PlatformType.PS4, icons.PS4Icon128, "PlayStation 4"),
new PlatformData(PlatformType.XboxScarlett, icons.XBoxScarletIcon128, "Xbox Scarlett"),
@@ -43,7 +43,9 @@ namespace FlaxEditor.Windows
{
{ PlatformType.Windows, new Windows() },
{ PlatformType.XboxOne, new XboxOne() },
#pragma warning disable CS0612
{ PlatformType.UWP, new UWP() },
#pragma warning restore CS0612
{ PlatformType.Linux, new Linux() },
{ PlatformType.PS4, new PS4() },
{ PlatformType.XboxScarlett, new XboxScarlett() },
@@ -164,8 +166,10 @@ namespace FlaxEditor.Windows
#if PLATFORM_WINDOWS
case BuildPlatform.Windows32:
case BuildPlatform.Windows64:
#pragma warning disable CS0612
case BuildPlatform.UWPx86:
case BuildPlatform.UWPx64:
#pragma warning restore CS0612
case BuildPlatform.LinuxX64:
case BuildPlatform.AndroidARM64:
case BuildPlatform.Web:
@@ -217,7 +221,9 @@ namespace FlaxEditor.Windows
class UWP : Platform
{
#pragma warning disable CS0612
protected override BuildPlatform BuildPlatform => BuildPlatform.UWPx64;
#pragma warning restore CS0612
}
class XboxOne : Platform
@@ -573,10 +579,12 @@ namespace FlaxEditor.Windows
case PlatformType.XboxOne:
name = "Xbox One";
break;
#pragma warning disable CS0612
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;
#pragma warning restore CS0612
case PlatformType.Linux:
name = "Linux";
break;
+2 -1
View File
@@ -21,8 +21,9 @@ API_ENUM() enum class PlatformType
/// <summary>
/// Running Windows Store App (Universal Windows Platform).
/// [Deprecated and unsupported platform]
/// </summary>
API_ENUM(Attributes="EditorDisplay(null, \"UWP\")")
API_ENUM(Attributes="EditorDisplay(null, \"UWP\"), Obsolete")
UWP = 3,
/// <summary>