bSupportsLandscapeRightOrientation
bSupportsLandscapeRightOrientation
#Overview
name: bSupportsLandscapeRightOrientation
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 6
C++ source files. Also referenced in 2
C# build files meaning it may affect the build system logic.
#Summary
#Usage in the C++ source code
The purpose of bSupportsLandscapeRightOrientation is to specify whether the iOS application supports the right landscape orientation. This setting is part of the device orientation configuration for iOS applications developed using Unreal Engine 5.
This setting variable is primarily used by the iOS-specific modules and subsystems within Unreal Engine 5. Based on the callsites, it is utilized in the following areas:
- IOSPlatformEditor: For configuring iOS-specific project settings.
- PIEPreviewDeviceProfileSelector: To determine screen orientation requirements during Play-in-Editor sessions.
- ApplicationCore: In the iOS app delegate and view implementations to set up supported orientations.
- IOSRuntimeSettings: As part of the iOS runtime configuration.
The value of this variable is typically set in the project settings, specifically in the iOS platform settings. It is stored in the engine configuration files and can be accessed or modified through the UIOSRuntimeSettings class.
This variable interacts with other orientation-related variables such as bSupportsPortraitOrientation, bSupportsUpsideDownOrientation, and bSupportsLandscapeLeftOrientation. Together, these variables define the set of supported orientations for the iOS app.
Developers should be aware that:
- At least one orientation must be supported. If all orientation support flags are set to false, the engine will automatically enable portrait orientation.
- This setting affects how the app behaves on iOS devices and how it’s presented in the App Store.
Best practices when using this variable include:
- Consider the nature of your game or app when deciding which orientations to support.
- Ensure that your UI and gameplay elements work correctly in all supported orientations.
- Test the app thoroughly in all supported orientations to ensure a consistent user experience.
- Be mindful of the performance implications of supporting multiple orientations, especially for graphics-intensive applications.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:2983, section: [/Script/IOSRuntimeSettings.IOSRuntimeSettings]
- INI Section:
/Script/IOSRuntimeSettings.IOSRuntimeSettings
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/IOS/IOSPlatformEditor/Private/IOSTargetSettingsCustomization.cpp:803
Scope: file
Source code excerpt:
SETUP_PLIST_PROP(bSupportsUpsideDownOrientation, OrientationCategory);
SETUP_PLIST_PROP(bSupportsLandscapeLeftOrientation, OrientationCategory);
SETUP_PLIST_PROP(bSupportsLandscapeRightOrientation, OrientationCategory);
SETUP_PLIST_PROP(PreferredLandscapeOrientation, OrientationCategory);
SETUP_PLIST_PROP(bSupportsITunesFileSharing, FileSystemCategory);
SETUP_PLIST_PROP(bSupportsFilesApp, FileSystemCategory);
SETUP_PLIST_PROP(bSupportsMetal, RenderCategory);
#Loc: <Workspace>/Engine/Source/Editor/PIEPreviewDeviceProfileSelector/Private/PIEPreviewDevice.cpp:216
Scope (from outer to inner):
file
function void FPIEPreviewDevice::DetermineScreenOrientationRequirements
Source code excerpt:
bool bSupportsUpsideDownOrientation;
bool bSupportsLandscapeLeftOrientation;
bool bSupportsLandscapeRightOrientation;
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsPortraitOrientation"), bSupportsPortraitOrientation, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsUpsideDownOrientation"), bSupportsUpsideDownOrientation, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsLandscapeLeftOrientation"), bSupportsLandscapeLeftOrientation, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsLandscapeRightOrientation"), bSupportsLandscapeRightOrientation, GEngineIni);
bNeedPortrait = bSupportsPortraitOrientation || bSupportsUpsideDownOrientation;
bNeedLandscape = bSupportsLandscapeLeftOrientation || bSupportsLandscapeRightOrientation;
}
break;
}
}
ERHIFeatureLevel::Type FPIEPreviewDevice::GetPreviewDeviceFeatureLevel() const
#Loc: <Workspace>/Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp:1157
Scope: file
Source code excerpt:
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsUpsideDownOrientation"), bSupportsPortraitUpsideDown, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsLandscapeLeftOrientation"), bSupportsLandscapeLeft, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsLandscapeRightOrientation"), bSupportsLandscapeRight, GEngineIni);
}
UIInterfaceOrientationMask Mask = 0;
if (bSupportsPortrait)
{
Mask |= UIInterfaceOrientationMaskPortrait;
#Loc: <Workspace>/Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSView.cpp:1105
Scope: file
Source code excerpt:
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsLandscapeLeftOrientation"), bSupportsLandscapeLeft, GEngineIni);
GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bSupportsLandscapeRightOrientation"), bSupportsLandscapeRight, GEngineIni);
GConfig->GetString(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("PreferredLandscapeOrientation"), PreferredLandscapeOrientation, GEngineIni);
if(bSupportsLandscapeLeft && bSupportsLandscapeRight)
{
if (PreferredLandscapeOrientation.Equals("LandscapeRight"))
{
#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Classes/IOSRuntimeSettings.h:376
Scope (from outer to inner):
file
class class UIOSRuntimeSettings : public UObject
Source code excerpt:
// Supports right landscape orientation. Portrait will not be supported.
UPROPERTY(GlobalConfig, EditAnywhere, Category = DeviceOrientations)
uint32 bSupportsLandscapeRightOrientation : 1;
// Whether files created by the app will be accessible from the iTunes File Sharing feature
UPROPERTY(GlobalConfig, EditAnywhere, Category = FileSystem, meta = (DisplayName = "Support iTunes File Sharing"))
uint32 bSupportsITunesFileSharing : 1;
// Whether files created by the app will be accessible from within the device's Files app (requires iTunes File Sharing)
#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Private/IOSRuntimeSettings.cpp:81
Scope (from outer to inner):
file
function void UIOSRuntimeSettings::PostEditChangeProperty
Source code excerpt:
// Ensure that at least one orientation is supported
if (!bSupportsPortraitOrientation && !bSupportsUpsideDownOrientation && !bSupportsLandscapeLeftOrientation && !bSupportsLandscapeRightOrientation)
{
bSupportsPortraitOrientation = true;
UpdateSinglePropertyInConfigFile(GetClass()->FindPropertyByName(GET_MEMBER_NAME_CHECKED(UIOSRuntimeSettings, bSupportsPortraitOrientation)), GetDefaultConfigFilename());
}
// Ensure that at least one API is supported
#References in C# build files
This variable is referenced in the following C# build files:
Location: <Workspace>/Engine/Source/Programs/UnrealBuildTool/Platform/IOS/UEDeployIOS.cs:573
Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsLandscapeLeftOrientation", out bSupportsLandscapeLeft);
bool bSupportsLandscapeRight = false;
Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsLandscapeRightOrientation", out bSupportsLandscapeRight);
bool bSupportsLandscape = bSupportsLandscapeLeft || bSupportsLandscapeRight;
if (bSupportsLandscapeLeft && bSupportsLandscapeRight)
{
// if both landscape orientations are present, set the UIInterfaceOrientation key
// in the orientation list, the preferred orientation should be first
Location: <Workspace>/Engine/Source/Programs/UnrealBuildTool/Platform/IOS/UEDeployIOS.cs:240
Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsLandscapeLeftOrientation", out bSupportsLandscapeLeft);
bool bSupportsLandscapeRight = false;
Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsLandscapeRightOrientation", out bSupportsLandscapeRight);
bool bSupportsLandscape = bSupportsLandscapeLeft || bSupportsLandscapeRight;
if (bSupportsLandscapeLeft && bSupportsLandscapeRight)
{
// if both landscape orientations are present, set the UIInterfaceOrientation key
// in the orientation list, the preferred orientation should be first