Add iOS platform (refactor Mac into shared Apple platform impl)
This commit is contained in:
@@ -71,6 +71,8 @@ IMPLEMENT_ENGINE_SETTINGS_GETTER(AndroidPlatformSettings, AndroidPlatform);
|
||||
IMPLEMENT_ENGINE_SETTINGS_GETTER(SwitchPlatformSettings, SwitchPlatform);
|
||||
#elif PLATFORM_MAC
|
||||
IMPLEMENT_ENGINE_SETTINGS_GETTER(MacPlatformSettings, MacPlatform);
|
||||
#elif PLATFORM_IOS
|
||||
IMPLEMENT_ENGINE_SETTINGS_GETTER(iOSPlatformSettings, iOSPlatform);
|
||||
#else
|
||||
#error Unknown platform
|
||||
#endif
|
||||
@@ -254,6 +256,7 @@ void GameSettings::Deserialize(DeserializeStream& stream, ISerializeModifier* mo
|
||||
DESERIALIZE(SwitchPlatform);
|
||||
DESERIALIZE(PS5Platform);
|
||||
DESERIALIZE(MacPlatform);
|
||||
DESERIALIZE(iOSPlatform);
|
||||
}
|
||||
|
||||
void LayersAndTagsSettings::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
|
||||
|
||||
@@ -202,6 +202,14 @@ namespace FlaxEditor.Content.Settings
|
||||
public JsonAsset MacPlatform;
|
||||
#endif
|
||||
|
||||
#if FLAX_EDITOR || PLATFORM_IOS
|
||||
/// <summary>
|
||||
/// Reference to <see cref="iOSPlatformSettings"/> asset. Used to apply configuration on iOS platform.
|
||||
/// </summary>
|
||||
[EditorOrder(2100), EditorDisplay("Platform Settings", "iOS"), AssetReference(typeof(iOSPlatformSettings), true), Tooltip("Reference to iOS Platform Settings asset")]
|
||||
public JsonAsset iOSPlatform;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Gets the absolute path to the game settings asset file.
|
||||
/// </summary>
|
||||
@@ -333,6 +341,10 @@ namespace FlaxEditor.Content.Settings
|
||||
if (type == typeof(MacPlatformSettings))
|
||||
return Load<MacPlatformSettings>(gameSettings.MacPlatform) as T;
|
||||
#endif
|
||||
#if FLAX_EDITOR || PLATFORM_IOS
|
||||
if (type == typeof(iOSPlatformSettings))
|
||||
return Load<iOSPlatformSettings>(gameSettings.iOSPlatform) as T;
|
||||
#endif
|
||||
|
||||
if (gameSettings.CustomSettings != null)
|
||||
{
|
||||
@@ -427,6 +439,10 @@ namespace FlaxEditor.Content.Settings
|
||||
if (type == typeof(MacPlatformSettings))
|
||||
return gameSettings.MacPlatform;
|
||||
#endif
|
||||
#if FLAX_EDITOR || PLATFORM_IOS
|
||||
if (type == typeof(iOSPlatformSettings))
|
||||
return gameSettings.iOSPlatform;
|
||||
#endif
|
||||
|
||||
if (gameSettings.CustomSettings != null)
|
||||
{
|
||||
@@ -539,6 +555,8 @@ namespace FlaxEditor.Content.Settings
|
||||
return SaveAsset(gameSettings, ref gameSettings.Audio, obj);
|
||||
if (type == typeof(MacPlatformSettings))
|
||||
return SaveAsset(gameSettings, ref gameSettings.MacPlatform, obj);
|
||||
if (type == typeof(iOSPlatformSettings))
|
||||
return SaveAsset(gameSettings, ref gameSettings.iOSPlatform, obj);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ public:
|
||||
Guid SwitchPlatform;
|
||||
Guid PS5Platform;
|
||||
Guid MacPlatform;
|
||||
Guid iOSPlatform;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@@ -35,3 +35,6 @@
|
||||
#if PLATFORM_MAC
|
||||
#include "Engine/Platform/Mac/MacPlatformSettings.h"
|
||||
#endif
|
||||
#if PLATFORM_IOS
|
||||
#include "Engine/Platform/iOS/iOSPlatformSettings.h"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user