LaptopScreenResolutions

LaptopScreenResolutions

#Overview

name: LaptopScreenResolutions

The value of this variable can be defined or overridden in .ini config files. 7 .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 LaptopScreenResolutions is to store a collection of common screen resolutions typically found on laptop devices. This variable is used in the Unreal Engine’s editor settings to provide predefined resolution options for developers when testing their games in the editor’s Play mode.

This setting variable is primarily used within the Unreal Editor subsystem, specifically in the LevelEditorPlaySettings module. It’s part of the ULevelEditorPlaySettings class, which manages various play-in-editor settings.

The value of this variable is set through configuration files, as indicated by the UPROPERTY(config) decorator. It’s likely initialized with default values in the engine’s configuration files and can be modified through the editor interface or project settings.

LaptopScreenResolutions interacts with other similar variables in the ULevelEditorPlaySettings class, such as MonitorScreenResolutions, PhoneScreenResolutions, TabletScreenResolutions, and TelevisionScreenResolutions. These variables collectively provide a comprehensive set of resolution options for different device types.

Developers should be aware that this variable is used to populate resolution options in the editor’s play settings menu. It’s important to ensure that the resolutions listed here are representative of current laptop screen resolutions to provide accurate testing environments.

Best practices when using this variable include:

  1. Regularly updating the list of resolutions to reflect current laptop screen trends.
  2. Ensuring a good range of resolutions are included, from lower to higher end laptops.
  3. Consider including both common aspect ratios (16:9, 16:10) and less common ones if relevant to your target audience.
  4. When adding custom resolutions, follow the existing format and structure of the FPlayScreenResolution objects.
  5. Be mindful that changes to this variable will affect all projects using these editor settings, so modifications should be made carefully and with consideration for all potential use cases.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:241, section: [/Script/UnrealEd.LevelEditorPlaySettings]

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:242, section: [/Script/UnrealEd.LevelEditorPlaySettings]

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:243, section: [/Script/UnrealEd.LevelEditorPlaySettings]

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:244, section: [/Script/UnrealEd.LevelEditorPlaySettings]

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:245, section: [/Script/UnrealEd.LevelEditorPlaySettings]

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:246, section: [/Script/UnrealEd.LevelEditorPlaySettings]

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:247, section: [/Script/UnrealEd.LevelEditorPlaySettings]

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

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> LaptopScreenResolutions;

	/** Collection of common screen resolutions on desktop monitors. */
	UPROPERTY(config)
	TArray<FPlayScreenResolution> MonitorScreenResolutions;

	/** Collection of common screen resolutions on mobile phones. */

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:594

Scope (from outer to inner):

file
function     void ULevelEditorPlaySettings::PostInitProperties

Source code excerpt:

#endif

	for (FPlayScreenResolution& Resolution : LaptopScreenResolutions)
	{
		Resolution.PostInitProperties();
	}
	for (FPlayScreenResolution& Resolution : MonitorScreenResolutions)
	{
		Resolution.PostInitProperties();

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:887

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);
}

FName ULevelEditorPlaySettings::GetCommonResolutionsMenuName()
{