FullSizeUnitGraph
FullSizeUnitGraph
#Overview
name: FullSizeUnitGraph
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If true, the unit graph is the old full size, full brightness version.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of FullSizeUnitGraph is to control the display size and brightness of the unit graph in Unreal Engine’s performance statistics visualization system.
This setting variable is primarily used in the engine’s performance monitoring and visualization subsystem, specifically within the FStatUnitData class, which is responsible for drawing performance statistics on the viewport.
The value of this variable is set through a console variable (CVar) named CVarFullSizeUnitGraph. It is defined as a TAutoConsoleVariable with an initial value of 0, meaning the default behavior is to use a smaller, less bright version of the unit graph.
The associated variable CVarFullSizeUnitGraph directly interacts with FullSizeUnitGraph. They share the same value and purpose, with CVarFullSizeUnitGraph being the actual console variable implementation.
Developers must be aware that:
- This variable affects the visual representation of performance statistics.
- Changing this value will impact the readability and screen space occupied by the unit graph.
- The variable is checked at runtime, so it can be changed dynamically during execution.
Best practices when using this variable include:
- Use the full-size graph (set to 1) when detailed analysis of performance statistics is required.
- Keep the default smaller graph (set to 0) for general development to minimize screen clutter.
- Consider the target platform and screen size when deciding which mode to use.
Regarding the associated variable CVarFullSizeUnitGraph:
The purpose of CVarFullSizeUnitGraph is to provide a console-accessible way to toggle between the full-size and compact versions of the unit graph.
It is implemented as a TAutoConsoleVariable, which allows it to be changed at runtime through the console or configuration files.
The value of this variable is set initially to 0 in the code, but can be modified during runtime.
This variable directly controls the behavior of the DrawStat function in the FStatUnitData class, determining whether to draw a full-size or compact graph.
Developers should be aware that:
- This is a console variable, so it can be changed through the in-game console or configuration files.
- The variable is of type int32, but it’s essentially used as a boolean (0 for small graph, non-zero for full-size graph).
Best practices for using CVarFullSizeUnitGraph include:
- Use it for debugging and performance analysis sessions.
- Document any persistent changes to this variable in project configuration files.
- Consider exposing this option in a developer-only UI for easier toggling during development and testing.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/UnrealClient.cpp:328
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarFullSizeUnitGraph(
TEXT("FullSizeUnitGraph"),
0,
TEXT("If true, the unit graph is the old full size, full brightness version."));
int32 FStatUnitData::DrawStat(FViewport* InViewport, FCanvas* InCanvas, int32 InX, int32 InY)
{
#Associated Variable and Callsites
This variable is associated with another variable named CVarFullSizeUnitGraph
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/UnrealClient.cpp:327
Scope: file
Source code excerpt:
FIntPoint FScreenshotRequest::HighresScreenshotMaskExtents;
static TAutoConsoleVariable<int32> CVarFullSizeUnitGraph(
TEXT("FullSizeUnitGraph"),
0,
TEXT("If true, the unit graph is the old full size, full brightness version."));
int32 FStatUnitData::DrawStat(FViewport* InViewport, FCanvas* InCanvas, int32 InX, int32 InY)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/UnrealClient.cpp:886
Scope (from outer to inner):
file
function int32 FStatUnitData::DrawStat
Source code excerpt:
if (bShowUnitTimeGraph)
{
const bool bSmallGraph = !CVarFullSizeUnitGraph.GetValueOnGameThread();
UFont* SmallFont = GEngine->GetSmallFont();
check(SmallFont);
int32 AlertPrintWidth = SmallFont->GetStringSize(TEXT("000.0"));
int32 AlertPrintHeight = SmallFont->GetStringHeightSize(TEXT("000.0"));