DebugResolutions
DebugResolutions
#Overview
name: DebugResolutions
The value of this variable can be defined or overridden in .ini config files. 26
.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 DebugResolutions is to define a set of screen resolutions used for debugging and testing user interface layouts in the Unreal Engine 5 UMG (Unreal Motion Graphics) Editor. This variable helps developers visualize how their UI designs will appear at different screen sizes during the design process.
The DebugResolutions variable is primarily used by the UMG Editor subsystem, specifically within the Designer view of the UMG Editor. It is part of the UWidgetEditingProjectSettings class, which belongs to the UMGEditor module.
The value of this variable is set in the project settings, as indicated by the UPROPERTY macro with the “config” specifier in the UWidgetEditingProjectSettings class definition.
DebugResolutions interacts with other variables and functions within the SDesignerView class, such as AreaSize and ZoomAmount. These are used to calculate and display the debug resolution overlays in the designer view.
Developers should be aware that:
- This variable affects the visual feedback in the UMG Editor’s designer view.
- It does not directly impact the runtime behavior of the UI but helps in designing responsive layouts.
- The resolutions defined here are used for snapping the design area to common screen sizes and for drawing resolution guides.
Best practices when using this variable include:
- Define a set of resolutions that cover the range of target devices for your project.
- Include both common and edge-case resolutions to ensure your UI design works across various screen sizes.
- Regularly test your UI layouts using these debug resolutions to catch any layout issues early in the development process.
- Update the DebugResolutions array as new target devices or resolutions become relevant to your project.
#Setting Variables
#References In INI files
<Workspace>/Engine/Config/BaseEditor.ini:622, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:623, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:624, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:625, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:626, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:627, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:628, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:629, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:630, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:631, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:632, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:633, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Engine/Config/BaseEditor.ini:634, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:33, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:34, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:35, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:36, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:37, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:38, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:39, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:40, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:41, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:42, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:43, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:44, section: [/Script/UMGEditor.UMGEditorProjectSettings]
<Workspace>/Projects/Lyra/Config/DefaultEditor.ini:45, section: [/Script/UMGEditor.UMGEditorProjectSettings]
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UMGEditor/Private/Designer/SDesignerView.cpp:153
Scope (from outer to inner):
file
class class SResizeDesignerHandle : public SCompoundWidget
function virtual FReply OnMouseMove
Source code excerpt:
if (const UWidgetEditingProjectSettings* Settings = DesignerView->GetRelevantSettings())
{
for (const FDebugResolution& Resolution : Settings->DebugResolutions)
{
if (((AreaSize - FVector2D(Resolution.Width, Resolution.Height)) * ZoomAmount).Size() < 10.0f)
{
AreaSize = FVector2D(Resolution.Width, Resolution.Height);
break;
}
#Loc: <Workspace>/Engine/Source/Editor/UMGEditor/Private/Designer/SDesignerView.cpp:2414
Scope (from outer to inner):
file
function void SDesignerView::OnPaintBackground
Source code excerpt:
if (const UWidgetEditingProjectSettings* Settings = FWidgetBlueprintEditorUtils::GetRelevantSettings(BlueprintEditor))
{
for (const FDebugResolution& Resolution : Settings->DebugResolutions)
{
DrawResolution(Resolution, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId);
}
}
}
}
#Loc: <Workspace>/Engine/Source/Editor/UMGEditor/Public/WidgetEditingProjectSettings.h:217
Scope (from outer to inner):
file
class class UWidgetEditingProjectSettings : public UDeveloperSettings
Source code excerpt:
UPROPERTY(EditAnywhere, config, Category=Designer)
TArray<FDebugResolution> DebugResolutions;
bool CompilerOption_AllowBlueprintTick(const class UWidgetBlueprint* WidgetBlueprint) const;
bool CompilerOption_AllowBlueprintPaint(const class UWidgetBlueprint* WidgetBlueprint) const;
EPropertyBindingPermissionLevel CompilerOption_PropertyBindingRule(const class UWidgetBlueprint* WidgetBlueprint) const;
TArray<UWidgetCompilerRule*> CompilerOption_Rules(const class UWidgetBlueprint* WidgetBlueprint) const;