bSupportsLandscapeLeftOrientation

bSupportsLandscapeLeftOrientation

#Overview

name: bSupportsLandscapeLeftOrientation

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 bSupportsLandscapeLeftOrientation is to specify whether the iOS application supports the landscape left orientation. This setting is part of the device orientation configuration for iOS apps developed using Unreal Engine 5.

This setting variable is primarily used by the iOS-specific subsystems and modules of Unreal Engine 5. Based on the callsites, it’s utilized in the following areas:

  1. IOSPlatformEditor: For setting up property list (plist) configurations.
  2. PIEPreviewDeviceProfileSelector: To determine screen orientation requirements for Play-in-Editor preview.
  3. ApplicationCore: For configuring supported orientations in the iOS app delegate and view.
  4. IOSRuntimeSettings: As part of the iOS-specific runtime settings.

The value of this variable is typically set in the project’s configuration files, specifically in the section “/Script/IOSRuntimeSettings.IOSRuntimeSettings” of the engine’s INI file (GEngineIni). It can be modified through the Unreal Engine editor’s project settings for iOS.

This variable interacts with other orientation-related variables such as bSupportsPortraitOrientation, bSupportsUpsideDownOrientation, and bSupportsLandscapeRightOrientation. Together, these variables determine the supported orientations for the iOS app.

Developers must be aware that:

  1. At least one orientation must be supported. If all orientation support flags are set to false, the engine will automatically enable portrait orientation.
  2. This setting affects how the app behaves on iOS devices and how it’s configured in the app’s Info.plist file.

Best practices when using this variable include:

  1. Consider the design and user experience of your app when deciding which orientations to support.
  2. Ensure that your UI and gameplay elements work correctly in all supported orientations.
  3. Test the app thoroughly on various iOS devices to verify that orientation changes work as expected.
  4. Be mindful of the performance implications of supporting multiple orientations, especially for graphically intensive apps.
  5. Coordinate this setting with your art and design teams to ensure assets and layouts are prepared for the supported orientations.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:2982, section: [/Script/IOSRuntimeSettings.IOSRuntimeSettings]

#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:802

Scope: file

Source code excerpt:

	SETUP_PLIST_PROP(bSupportsPortraitOrientation, OrientationCategory);
	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);
	

#Loc: <Workspace>/Engine/Source/Editor/PIEPreviewDeviceProfileSelector/Private/PIEPreviewDevice.cpp:215

Scope (from outer to inner):

file
function     void FPIEPreviewDevice::DetermineScreenOrientationRequirements

Source code excerpt:

			bool bSupportsPortraitOrientation;
			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:1156

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)
	{

#Loc: <Workspace>/Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSView.cpp:1104

Scope: file

Source code excerpt:

	bool bSupportsLandscapeRight = false;

	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:372

Scope (from outer to inner):

file
class        class UIOSRuntimeSettings : public UObject

Source code excerpt:

	// Supports left landscape orientation. Portrait will not be supported.
	UPROPERTY(GlobalConfig, EditAnywhere, Category = DeviceOrientations)
	uint32 bSupportsLandscapeLeftOrientation : 1;

	// 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

#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:571


			bool bSupportsLandscapeLeft = false;
			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)
			{

Location: <Workspace>/Engine/Source/Programs/UnrealBuildTool/Platform/IOS/UEDeployIOS.cs:238


			bool bSupportsLandscapeLeft = false;
			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)
			{