TelevisionScreenResolutions

TelevisionScreenResolutions

#Overview

name: TelevisionScreenResolutions

The value of this variable can be defined or overridden in .ini config files. 4 .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 TelevisionScreenResolutions is to store a collection of common screen resolutions specifically for television screens. This variable is part of the Unreal Engine’s editor settings, particularly for configuring play-in-editor (PIE) viewport settings.

This setting variable is primarily used by the Unreal Editor subsystem, specifically within the LevelEditorPlaySettings module. It’s part of the ULevelEditorPlaySettings class, which is responsible for managing various play-in-editor configuration options.

The value of this variable is set through the config system in Unreal Engine. It’s declared with the UPROPERTY(config) macro, which means its values are loaded from and saved to configuration files.

TelevisionScreenResolutions interacts with other similar variables like LaptopScreenResolutions and MonitorScreenResolutions. These variables are used together to provide a comprehensive list of screen resolutions for different device types in the editor settings.

Developers should be aware that this variable is used to populate a submenu in the editor settings for selecting common television screen resolutions. It’s important to keep this list up-to-date with current and relevant television resolutions to provide users with accurate options.

Best practices when using this variable include:

  1. Regularly updating the list to include new, common television resolutions.
  2. Ensuring that the resolutions added are actually common for televisions to avoid cluttering the menu with rarely used options.
  3. Considering regional differences in common television resolutions when populating this list.
  4. Using this in conjunction with other resolution lists (like LaptopScreenResolutions and MonitorScreenResolutions) to provide a comprehensive set of options for different display types.
  5. When adding or modifying resolutions, ensure they are properly formatted and initialized using the PostInitProperties method, as seen in the code excerpts.

#Setting Variables

#References In INI files

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

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

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

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

Scope (from outer to inner):

file
class        class ULevelEditorPlaySettings : public UObject

Source code excerpt:

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

	UPROPERTY(config, VisibleAnywhere, Category = GameViewportSettings)
	FString DeviceToEmulate;

	UPROPERTY(config)
	FMargin PIESafeZoneOverride;

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

Scope (from outer to inner):

file
function     void ULevelEditorPlaySettings::PostInitProperties

Source code excerpt:

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

	PushDebugDrawingSettings();
}

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

Scope (from outer to inner):

file
function     void ULevelEditorPlaySettings::RegisterCommonResolutionsMenu

Source code excerpt:

	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");
	return MenuName;