Add iOS to Game Cooker platforms

This commit is contained in:
Wojtek Figat
2023-04-12 22:29:21 +02:00
parent 8c94b56080
commit 047eb2eddf
4 changed files with 14 additions and 1 deletions

View File

@@ -64,7 +64,7 @@
#include "Platform/Mac/MacPlatformTools.h" #include "Platform/Mac/MacPlatformTools.h"
#include "Engine/Platform/Mac/MacPlatformSettings.h" #include "Engine/Platform/Mac/MacPlatformSettings.h"
#endif #endif
#if PLATFORM_TOOLS_MAC #if PLATFORM_TOOLS_IOS
#include "Platform/iOS/iOSPlatformTools.h" #include "Platform/iOS/iOSPlatformTools.h"
#include "Engine/Platform/iOS/iOSPlatformSettings.h" #include "Engine/Platform/iOS/iOSPlatformSettings.h"
#endif #endif

View File

@@ -92,6 +92,7 @@ namespace FlaxEditor.GUI
new PlatformData(PlatformType.Switch, icons.SwitchIcon128, "Switch"), new PlatformData(PlatformType.Switch, icons.SwitchIcon128, "Switch"),
new PlatformData(PlatformType.PS5, icons.PS5Icon128, "PlayStation 5"), new PlatformData(PlatformType.PS5, icons.PS5Icon128, "PlayStation 5"),
new PlatformData(PlatformType.Mac, icons.MacOSIcon128, "macOS"), new PlatformData(PlatformType.Mac, icons.MacOSIcon128, "macOS"),
new PlatformData(PlatformType.iOS, icons.FlaxLogo128, "iOS"),
}; };
const float IconSize = 64.0f; const float IconSize = 64.0f;

View File

@@ -948,6 +948,7 @@ namespace FlaxEditor.Modules
Proxy.Add(new SettingsProxy(typeof(LinuxPlatformSettings), Editor.Instance.Icons.LinuxSettings128)); Proxy.Add(new SettingsProxy(typeof(LinuxPlatformSettings), Editor.Instance.Icons.LinuxSettings128));
Proxy.Add(new SettingsProxy(typeof(AndroidPlatformSettings), Editor.Instance.Icons.AndroidSettings128)); Proxy.Add(new SettingsProxy(typeof(AndroidPlatformSettings), Editor.Instance.Icons.AndroidSettings128));
Proxy.Add(new SettingsProxy(typeof(MacPlatformSettings), Editor.Instance.Icons.Document128)); Proxy.Add(new SettingsProxy(typeof(MacPlatformSettings), Editor.Instance.Icons.Document128));
Proxy.Add(new SettingsProxy(typeof(iOSPlatformSettings), Editor.Instance.Icons.Document128));
var typePS4PlatformSettings = TypeUtils.GetManagedType(GameSettings.PS4PlatformSettingsTypename); var typePS4PlatformSettings = TypeUtils.GetManagedType(GameSettings.PS4PlatformSettingsTypename);
if (typePS4PlatformSettings != null) if (typePS4PlatformSettings != null)

View File

@@ -47,6 +47,7 @@ namespace FlaxEditor.Windows
{ PlatformType.Switch, new Switch() }, { PlatformType.Switch, new Switch() },
{ PlatformType.PS5, new PS5() }, { PlatformType.PS5, new PS5() },
{ PlatformType.Mac, new Mac() }, { PlatformType.Mac, new Mac() },
{ PlatformType.iOS, new iOS() },
}; };
public BuildTabProxy(GameCookerWindow win, PlatformSelector platformSelector) public BuildTabProxy(GameCookerWindow win, PlatformSelector platformSelector)
@@ -64,6 +65,7 @@ namespace FlaxEditor.Windows
PerPlatformOptions[PlatformType.Switch].Init("Output/Switch", "Switch"); PerPlatformOptions[PlatformType.Switch].Init("Output/Switch", "Switch");
PerPlatformOptions[PlatformType.PS5].Init("Output/PS5", "PS5"); PerPlatformOptions[PlatformType.PS5].Init("Output/PS5", "PS5");
PerPlatformOptions[PlatformType.Mac].Init("Output/Mac", "Mac"); PerPlatformOptions[PlatformType.Mac].Init("Output/Mac", "Mac");
PerPlatformOptions[PlatformType.iOS].Init("Output/iOS", "iOS");
} }
[HideInEditor] [HideInEditor]
@@ -133,6 +135,7 @@ namespace FlaxEditor.Windows
{ {
case BuildPlatform.MacOSx64: case BuildPlatform.MacOSx64:
case BuildPlatform.MacOSARM64: case BuildPlatform.MacOSARM64:
case BuildPlatform.iOSARM64:
case BuildPlatform.AndroidARM64: case BuildPlatform.AndroidARM64:
IsSupported = true; IsSupported = true;
break; break;
@@ -244,6 +247,11 @@ namespace FlaxEditor.Windows
protected override BuildPlatform BuildPlatform => CPU == Archs.ARM64 ? BuildPlatform.MacOSARM64 : BuildPlatform.MacOSx64; protected override BuildPlatform BuildPlatform => CPU == Archs.ARM64 ? BuildPlatform.MacOSARM64 : BuildPlatform.MacOSx64;
} }
class iOS : Platform
{
protected override BuildPlatform BuildPlatform => BuildPlatform.iOSARM64;
}
class Editor : CustomEditor class Editor : CustomEditor
{ {
private PlatformType _platform; private PlatformType _platform;
@@ -295,6 +303,9 @@ namespace FlaxEditor.Windows
case PlatformType.Mac: case PlatformType.Mac:
name = "Mac"; name = "Mac";
break; break;
case PlatformType.iOS:
name = "iOS";
break;
default: default:
name = Utilities.Utils.GetPropertyNameUI(_platform.ToString()); name = Utilities.Utils.GetPropertyNameUI(_platform.ToString());
break; break;