PhoneScreenResolutions
PhoneScreenResolutions
#Overview
name: PhoneScreenResolutions
The value of this variable can be defined or overridden in .ini config files. 33
.ini config files referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of PhoneScreenResolutions is to store a collection of common screen resolutions for mobile phones in the Unreal Engine 5 editor. This variable is part of the level editor play settings, which are used to configure how the game is previewed and tested within the editor.
The PhoneScreenResolutions variable is primarily used in the UnrealEd module, specifically within the LevelEditorPlaySettings class. This class is responsible for managing various settings related to playing and testing levels within the Unreal Engine editor.
The value of this variable is set through the config system, as indicated by the UPROPERTY(config) attribute. This means that the values are likely stored in an INI configuration file and can be modified through the editor’s project settings or manually in the config files.
PhoneScreenResolutions interacts with other similar variables such as TabletScreenResolutions, LaptopScreenResolutions, MonitorScreenResolutions, and TelevisionScreenResolutions. These variables collectively provide a comprehensive set of screen resolution options for different device types.
Developers should be aware that this variable is used to populate a submenu in the editor’s play settings. The RegisterCommonResolutionsMenu() function uses this variable to create a “Phones” section in the resolution selection menu.
Best practices when using this variable include:
- Keeping the list of phone screen resolutions up-to-date with current market trends and popular device resolutions.
- Ensuring that the resolutions added are appropriate for phone screens and do not overlap with tablet or other device categories.
- Considering the impact of these resolutions on performance and testing, especially for mobile-targeted games.
- Using this variable in conjunction with other resolution settings to provide a comprehensive testing environment for different screen sizes and aspect ratios.
- Regularly reviewing and updating the list to remove obsolete resolutions and add new ones as the mobile device market evolves.
By properly maintaining and utilizing this variable, developers can ensure their games are tested across a range of common phone screen resolutions, leading to better compatibility and user experience on mobile devices.
#Setting Variables
#References In INI files
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:257, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:258, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:259, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:260, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:261, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:262, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:263, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:264, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:265, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:266, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:267, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:268, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:269, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:270, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:271, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:272, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:273, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:274, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:275, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:276, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:277, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:278, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:279, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:280, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:281, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:282, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:283, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:284, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:285, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:286, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:287, section: [/Script/UnrealEd.LevelEditorPlaySettings]
... omitting 3 locations ...
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/LevelEditorPlaySettings.h:570
Scope (from outer to inner):
file
class class ULevelEditorPlaySettings : public UObject
Source code excerpt:
/** Collection of common screen resolutions on mobile phones. */
UPROPERTY(config)
TArray<FPlayScreenResolution> PhoneScreenResolutions;
/** Collection of common screen resolutions on tablet devices. */
UPROPERTY(config)
TArray<FPlayScreenResolution> TabletScreenResolutions;
/** Collection of common screen resolutions on television screens. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:602
Scope (from outer to inner):
file
function void ULevelEditorPlaySettings::PostInitProperties
Source code excerpt:
Resolution.PostInitProperties();
}
for (FPlayScreenResolution& Resolution : PhoneScreenResolutions)
{
Resolution.PostInitProperties();
}
for (FPlayScreenResolution& Resolution : TabletScreenResolutions)
{
Resolution.PostInitProperties();
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:885
Scope (from outer to inner):
file
function void ULevelEditorPlaySettings::RegisterCommonResolutionsMenu
Source code excerpt:
};
AddSubMenuToSection(FString("Phones"), LOCTEXT("CommonPhonesSectionHeader", "Phones"), PlaySettings->PhoneScreenResolutions);
AddSubMenuToSection(FString("Tablets"), LOCTEXT("CommonTabletsSectionHeader", "Tablets"), PlaySettings->TabletScreenResolutions);
AddSubMenuToSection(FString("Laptops"), LOCTEXT("CommonLaptopsSectionHeader", "Laptops"), PlaySettings->LaptopScreenResolutions);
AddSubMenuToSection(FString("Monitors"), LOCTEXT("CommonMonitorsSectionHeader", "Monitors"), PlaySettings->MonitorScreenResolutions);
AddSubMenuToSection(FString("Televisions"), LOCTEXT("CommonTelevesionsSectionHeader", "Televisions"), PlaySettings->TelevisionScreenResolutions);
}