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:
- Regularly updating the list to include new, common television resolutions.
- Ensuring that the resolutions added are actually common for televisions to avoid cluttering the menu with rarely used options.
- Considering regional differences in common television resolutions when populating this list.
- Using this in conjunction with other resolution lists (like LaptopScreenResolutions and MonitorScreenResolutions) to provide a comprehensive set of options for different display types.
- 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]
- INI Section:
/Script/UnrealEd.LevelEditorPlaySettings
- Raw value:
(Description="720p (HDTV, Blu-ray)",Width=1280,Height=720,AspectRatio="16:9",bCanSwapAspectRatio=true)
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:312, section: [/Script/UnrealEd.LevelEditorPlaySettings]
- INI Section:
/Script/UnrealEd.LevelEditorPlaySettings
- Raw value:
(Description="1080i, 1080p (HDTV, Blu-ray)",Width=1920,Height=1080,AspectRatio="16:9",bCanSwapAspectRatio=true)
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:313, section: [/Script/UnrealEd.LevelEditorPlaySettings]
- INI Section:
/Script/UnrealEd.LevelEditorPlaySettings
- Raw value:
(Description="4K Ultra HD",Width=3840,Height=2160,AspectRatio="16:9",bCanSwapAspectRatio=true)
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:314, section: [/Script/UnrealEd.LevelEditorPlaySettings]
- INI Section:
/Script/UnrealEd.LevelEditorPlaySettings
- Raw value:
(Description="4K Digital Cinema",Width=4096,Height=2160,AspectRatio="1.90:1",bCanSwapAspectRatio=true)
- Is Array:
True
#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;