MonitorScreenResolutions

MonitorScreenResolutions

#Overview

name: MonitorScreenResolutions

The value of this variable can be defined or overridden in .ini config files. 5 .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 MonitorScreenResolutions is to store a collection of common screen resolutions for desktop monitors in the Unreal Engine 5 editor’s play settings. This variable is part of the level editor’s play settings configuration, which allows developers to simulate different screen resolutions when testing their game in the editor.

MonitorScreenResolutions is used within the UnrealEd module, specifically in the LevelEditorPlaySettings class. This class is responsible for managing various play-in-editor settings, including screen resolutions for different device types.

The value of this variable is set through configuration files and can be modified in the editor’s project settings. It is populated with default values during the initialization of the LevelEditorPlaySettings object.

MonitorScreenResolutions interacts with other similar variables in the LevelEditorPlaySettings class, such as PhoneScreenResolutions, TabletScreenResolutions, LaptopScreenResolutions, 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 the resolution options in the editor’s play settings menu. Changes to this variable will affect the available choices for monitor resolutions when launching the game in the editor.

Best practices when using this variable include:

  1. Ensuring that the resolutions listed are relevant and up-to-date with current monitor standards.
  2. Considering the target audience and their likely display resolutions when customizing this list.
  3. Regularly reviewing and updating the resolutions to accommodate new display technologies.
  4. Using this variable in conjunction with other resolution variables to provide a comprehensive set of testing options across different device types.
  5. Being mindful of performance implications when testing at various resolutions, especially extremely high or low ones.

#Setting Variables

#References In INI files

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

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

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

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

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:254, 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:566

Scope (from outer to inner):

file
class        class ULevelEditorPlaySettings : public UObject

Source code excerpt:

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

	/** Collection of common screen resolutions on mobile phones. */
	UPROPERTY(config)
	TArray<FPlayScreenResolution> PhoneScreenResolutions;

	/** Collection of common screen resolutions on tablet devices. */

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

Scope (from outer to inner):

file
function     void ULevelEditorPlaySettings::PostInitProperties

Source code excerpt:

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

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

Scope (from outer to inner):

file
function     void ULevelEditorPlaySettings::RegisterCommonResolutionsMenu

Source code excerpt:

	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()
{
	const static FName MenuName("EditorSettingsViewer.LevelEditorPlaySettings");