LoginSignup
2
1

More than 1 year has passed since last update.

[UE4] iniファイルの管理で使うプラットフォーム名(Platform)の調べ方

Last updated at Posted at 2022-02-15

はじめに

特定のプラットフォーム毎に処理や品質設定などを変えたい場合は、[プラットフォーム名]Engine.ini といったファイルを作成・編集する必要があります。例えば、WindowsEngine.ini や AndroidEngine.ini などです。公式ドキュメントにもこう書かれています。

image.png
公式ドキュメント:コンフィギュレーション ファイル

しかし、このプラットフォーム名が具体的にどんな文字列なのかについては(恐らく諸事情で)書かれていません。なので、調べ方についてご紹介します

プラットフォーム名(Platform)の調べ方

各プラットフォームごとに定義された IniPlatformName 関数 を見てください
おわり

…Windowsの場合

Engine\Source\Runtime\Core\Public\Windows\WindowsPlatformProperties.h
struct FWindowsPlatformProperties
    : public FGenericPlatformProperties
{
...
    static FORCEINLINE const char* IniPlatformName()
    {
        return "Windows";
    }

Android

Engine\Source\Runtime\Core\Public\Android\AndroidPlatformProperties.h
struct FAndroidPlatformProperties
    : public FGenericPlatformProperties
{
...
    static FORCEINLINE const char* IniPlatformName()
    {
        return "Android";
    }

IOS

Engine\Source\Runtime\Core\Public\IOS\IOSPlatformProperties.h
struct FIOSPlatformProperties
    : public FGenericPlatformProperties
{
...
    static FORCEINLINE const char* IniPlatformName( )
    {
        return "IOS";
    }

Mac

Engine\Source\Runtime\Core\Public\Mac\MacPlatformProperties.h
struct FMacPlatformProperties
    : public FGenericPlatformProperties
{
...
    static FORCEINLINE const char* IniPlatformName( )
    {
        return "Mac";
    }

Linux

Engine\Source\Runtime\Core\Public\Linux\LinuxPlatformProperties.h
struct FLinuxPlatformProperties
    : public FGenericPlatformProperties
{
...
    static FORCEINLINE const char* IniPlatformName( )
    {
        return IS_AARCH64 ? "LinuxAArch64" : "Linux";
    }

その他のプラットフォーム は是非ご自身の目でご確認ください!
おしまい

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1