TabletScreenResolutions

TabletScreenResolutions

#Overview

name: TabletScreenResolutions

The value of this variable can be defined or overridden in .ini config files. 17 .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 TabletScreenResolutions is to store a collection of common screen resolutions for tablet devices 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 test their games at various screen resolutions during development.

TabletScreenResolutions is primarily used in the UnrealEd module, specifically within 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 the config system in Unreal Engine. It is declared with the UPROPERTY(config) macro, which means its values are loaded from and saved to configuration files.

TabletScreenResolutions interacts with other similar variables in the LevelEditorPlaySettings class, such as PhoneScreenResolutions, 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 part of a larger system for managing play-in-editor settings. When modifying or accessing TabletScreenResolutions, they should consider the impact on the overall play testing experience and ensure that the resolutions added are appropriate for tablet devices.

Best practices when using this variable include:

  1. Keeping the list of resolutions up-to-date with common tablet screen resolutions in the market.
  2. Ensuring that the resolutions added are actually representative of tablet devices to maintain the integrity of the testing process.
  3. Considering the performance impact of testing at various resolutions and using this variable in conjunction with other play settings to create comprehensive test scenarios.
  4. Documenting any custom resolutions added to this list for team-wide understanding and consistency.
  5. Regularly reviewing and updating the list to remove outdated resolutions and add new ones as tablet technology evolves.

#Setting Variables

#References In INI files

<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:292, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:293, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:294, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:295, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:296, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:297, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:298, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:299, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:300, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:301, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:302, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:303, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:304, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:305, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:306, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:307, section: [/Script/UnrealEd.LevelEditorPlaySettings]
<Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:308, 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:574

Scope (from outer to inner):

file
class        class ULevelEditorPlaySettings : public UObject

Source code excerpt:

	/** Collection of common screen resolutions on tablet devices. */
	UPROPERTY(config)
	TArray<FPlayScreenResolution> TabletScreenResolutions;

	/** Collection of common screen resolutions on television screens. */
	UPROPERTY(config)
	TArray<FPlayScreenResolution> TelevisionScreenResolutions;

	UPROPERTY(config, VisibleAnywhere, Category = GameViewportSettings)

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

Scope (from outer to inner):

file
function     void ULevelEditorPlaySettings::PostInitProperties

Source code excerpt:

		Resolution.PostInitProperties();
	}
	for (FPlayScreenResolution& Resolution : TabletScreenResolutions)
	{
		Resolution.PostInitProperties();
	}
	for (FPlayScreenResolution& Resolution : TelevisionScreenResolutions)
	{
		Resolution.PostInitProperties();

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

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