From 6c5321d2257c8dbc92b2000ae8fe556cf5dbee21 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 30 Sep 2026 22:03:48 +0200 Subject: [PATCH] Add deprecation attributes to old UWP platform --- Source/Editor/Cooker/CookingData.h | 6 ++++-- Source/Editor/Cooker/GameCooker.cs | 2 ++ Source/Editor/Editor.cs | 10 ++++++++++ Source/Editor/GUI/PlatformSelector.cs | 2 ++ Source/Editor/Windows/GameCookerWindow.cs | 8 ++++++++ Source/Engine/Platform/Defines.h | 3 ++- 6 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Source/Editor/Cooker/CookingData.h b/Source/Editor/Cooker/CookingData.h index ddc02fa67..3c6408ffe 100644 --- a/Source/Editor/Cooker/CookingData.h +++ b/Source/Editor/Cooker/CookingData.h @@ -67,14 +67,16 @@ API_ENUM() enum class BuildPlatform /// /// Universal Windows Platform (UWP) (x86 architecture) + /// [Deprecated and unsupported platform] /// - API_ENUM(Attributes="EditorDisplay(null, \"Windows Store x86\")") + API_ENUM(Attributes="EditorDisplay(null, \"Windows Store x86\"), Obsolete") UWPx86 = 3, /// /// Universal Windows Platform (UWP) (x64 architecture) + /// [Deprecated and unsupported platform] /// - API_ENUM(Attributes="EditorDisplay(null, \"Windows Store x64\")") + API_ENUM(Attributes="EditorDisplay(null, \"Windows Store x64\"), Obsolete") UWPx64 = 4, /// diff --git a/Source/Editor/Cooker/GameCooker.cs b/Source/Editor/Cooker/GameCooker.cs index ef91dd5f9..5c84b0b0b 100644 --- a/Source/Editor/Cooker/GameCooker.cs +++ b/Source/Editor/Cooker/GameCooker.cs @@ -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; diff --git a/Source/Editor/Editor.cs b/Source/Editor/Editor.cs index 7e624efd3..c305e3d05 100644 --- a/Source/Editor/Editor.cs +++ b/Source/Editor/Editor.cs @@ -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; } diff --git a/Source/Editor/GUI/PlatformSelector.cs b/Source/Editor/GUI/PlatformSelector.cs index 3b1b85e90..5b9ec9a74 100644 --- a/Source/Editor/GUI/PlatformSelector.cs +++ b/Source/Editor/GUI/PlatformSelector.cs @@ -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"), diff --git a/Source/Editor/Windows/GameCookerWindow.cs b/Source/Editor/Windows/GameCookerWindow.cs index ad43a3ee0..38252ef1e 100644 --- a/Source/Editor/Windows/GameCookerWindow.cs +++ b/Source/Editor/Windows/GameCookerWindow.cs @@ -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; diff --git a/Source/Engine/Platform/Defines.h b/Source/Engine/Platform/Defines.h index ce4fbcb5c..7f7bd69f1 100644 --- a/Source/Engine/Platform/Defines.h +++ b/Source/Engine/Platform/Defines.h @@ -21,8 +21,9 @@ API_ENUM() enum class PlatformType /// /// Running Windows Store App (Universal Windows Platform). + /// [Deprecated and unsupported platform] /// - API_ENUM(Attributes="EditorDisplay(null, \"UWP\")") + API_ENUM(Attributes="EditorDisplay(null, \"UWP\"), Obsolete") UWP = 3, ///