r.MinYResolutionFor3DView
r.MinYResolutionFor3DView
#Overview
name: r.MinYResolutionFor3DView
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Defines the smallest Y resolution we want to support in the 3D view
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.MinYResolutionFor3DView is to define the smallest vertical resolution (Y resolution) that the 3D view in Unreal Engine will support. This setting is primarily related to the rendering system and user interface scaling.
This setting variable is used in the Engine module, specifically within the KismetSystemLibrary. Based on the callsites, it’s clear that this variable is part of the core engine functionality rather than a specific plugin or subsystem.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 360 pixels, but can be changed at runtime through console commands or configuration files.
The associated variable CVarMinYResolutionFor3DView interacts directly with r.MinYResolutionFor3DView. They share the same value and purpose. CVarMinYResolutionFor3DView is the actual TAutoConsoleVariable object that holds and manages the value.
Developers must be aware that this variable affects the minimum vertical resolution for the 3D view. It’s important to consider this when designing user interfaces or planning for different display resolutions. The value is clamped between 200 and 8192 pixels, so any attempt to set it outside this range will be automatically adjusted.
Best practices when using this variable include:
- Consider the target platforms and their typical display resolutions when adjusting this value.
- Test the UI and 3D view rendering at various resolutions, including the minimum set by this variable.
- Use the GetMinYResolutionFor3DView() function from UKismetSystemLibrary when needing to access this value in code, as it ensures the value is properly clamped.
Regarding the associated variable CVarMinYResolutionFor3DView:
- Its purpose is to provide a programmatic interface to the r.MinYResolutionFor3DView setting.
- It’s used within the Engine module to store and retrieve the minimum Y resolution value.
- The value is set during initialization of the static TAutoConsoleVariable object.
- It interacts directly with r.MinYResolutionFor3DView, essentially serving as its backing store.
- Developers should be aware that modifying CVarMinYResolutionFor3DView directly will affect r.MinYResolutionFor3DView.
- Best practice is to use the console variable system to modify this value rather than attempting to change CVarMinYResolutionFor3DView directly in code.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/KismetSystemLibrary.cpp:2721
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarMinYResolutionFor3DView(
TEXT("r.MinYResolutionFor3DView"),
360,
TEXT("Defines the smallest Y resolution we want to support in the 3D view"),
ECVF_RenderThreadSafe
);
int32 UKismetSystemLibrary::GetMinYResolutionForUI()
#Associated Variable and Callsites
This variable is associated with another variable named CVarMinYResolutionFor3DView
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/KismetSystemLibrary.cpp:2720
Scope: file
Source code excerpt:
);
static TAutoConsoleVariable<int32> CVarMinYResolutionFor3DView(
TEXT("r.MinYResolutionFor3DView"),
360,
TEXT("Defines the smallest Y resolution we want to support in the 3D view"),
ECVF_RenderThreadSafe
);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/KismetSystemLibrary.cpp:2736
Scope (from outer to inner):
file
function int32 UKismetSystemLibrary::GetMinYResolutionFor3DView
Source code excerpt:
int32 UKismetSystemLibrary::GetMinYResolutionFor3DView()
{
int32 Value = FMath::Clamp(CVarMinYResolutionFor3DView.GetValueOnGameThread(), 200, 8 * 1024);
return Value;
}
void UKismetSystemLibrary::LaunchURL(const FString& URL)
{