From 7fae0d9fb69a709964b487d82623aee3afde65bc Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 8 Feb 2023 23:41:24 +0100 Subject: [PATCH] Fix to ignore warning due to missing NDA consoles packages --- Source/Editor/CustomEditors/Editors/AssetRefEditor.cs | 2 +- Source/Engine/Core/Config/GameSettings.cs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Editor/CustomEditors/Editors/AssetRefEditor.cs b/Source/Editor/CustomEditors/Editors/AssetRefEditor.cs index 434d0c558..ddfe54897 100644 --- a/Source/Editor/CustomEditors/Editors/AssetRefEditor.cs +++ b/Source/Editor/CustomEditors/Editors/AssetRefEditor.cs @@ -72,7 +72,7 @@ namespace FlaxEditor.CustomEditors.Editors var customType = TypeUtils.GetType(assetReference.TypeName); if (customType != ScriptType.Null) assetType = customType; - else + else if (!Content.Settings.GameSettings.OptionalPlatformSettings.Contains(assetReference.TypeName)) Debug.LogWarning(string.Format("Unknown asset type '{0}' to use for asset picker filter.", assetReference.TypeName)); } } diff --git a/Source/Engine/Core/Config/GameSettings.cs b/Source/Engine/Core/Config/GameSettings.cs index f3ef7b7a1..fbd27e3ca 100644 --- a/Source/Engine/Core/Config/GameSettings.cs +++ b/Source/Engine/Core/Config/GameSettings.cs @@ -14,6 +14,16 @@ namespace FlaxEditor.Content.Settings internal const string XboxOnePlatformSettingsTypename = "FlaxEditor.Content.Settings.XboxOnePlatformSettings"; internal const string XboxScarlettPlatformSettingsTypename = "FlaxEditor.Content.Settings.XboxScarlettPlatformSettings"; internal const string SwitchPlatformSettingsTypename = "FlaxEditor.Content.Settings.SwitchPlatformSettings"; +#if FLAX_EDITOR + internal static string[] OptionalPlatformSettings = + { + PS4PlatformSettingsTypename, + PS5PlatformSettingsTypename, + XboxOnePlatformSettingsTypename, + XboxScarlettPlatformSettingsTypename, + SwitchPlatformSettingsTypename, + }; +#endif /// /// The default application icon.