r.Streaming.CheckBuildStatus
r.Streaming.CheckBuildStatus
#Overview
name: r.Streaming.CheckBuildStatus
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If non-zero, the engine will check whether texture streaming needs rebuild.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Streaming.CheckBuildStatus is to control whether the engine checks if texture streaming needs to be rebuilt. This setting variable is primarily used for the texture streaming system in Unreal Engine 5.
The Unreal Engine subsystem that relies on this setting variable is the texture streaming system, which is part of the Engine module. This can be seen from the file paths where the variable is referenced, such as Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp and Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingBuild.cpp.
The value of this variable is set through the console variable system in Unreal Engine. It is defined as a TAutoConsoleVariable with a default value of 0, which means the check is disabled by default.
This variable interacts with the world’s texture streaming system. When enabled (set to a value greater than 0), it triggers a check for texture streaming build validity in the CheckTextureStreamingBuildValidity function.
Developers should be aware that enabling this check (by setting the value to non-zero) may have performance implications, as it will cause the engine to perform additional checks on the texture streaming system.
Best practices for using this variable include:
- Keep it disabled (set to 0) in production builds to avoid unnecessary performance overhead.
- Enable it (set to non-zero) during development or debugging when you need to verify the integrity of the texture streaming build.
- Use it in conjunction with other texture streaming settings to optimize the streaming system.
The associated variable CVarStreamingCheckBuildStatus is the actual console variable object that controls this setting. It is used in the same way as r.Streaming.CheckBuildStatus, but it’s the C++ representation of the console variable.
The purpose of CVarStreamingCheckBuildStatus is to provide programmatic access to the r.Streaming.CheckBuildStatus setting within the C++ code. It allows the engine to query the current value of the setting and adjust its behavior accordingly.
This associated variable is used in the texture streaming subsystem of the Engine module. It’s primarily referenced in the CheckTextureStreamingBuildValidity function, where its value determines whether the texture streaming build validity check should be performed.
The value of CVarStreamingCheckBuildStatus is set automatically by the console variable system when r.Streaming.CheckBuildStatus is modified.
Developers should be aware that CVarStreamingCheckBuildStatus.GetValueOnAnyThread() is used to retrieve the current value of the setting. This method is thread-safe and can be called from any thread.
Best practices for using CVarStreamingCheckBuildStatus include:
- Use GetValueOnAnyThread() when accessing the value, as it’s thread-safe.
- Remember that changes to r.Streaming.CheckBuildStatus will be reflected in CVarStreamingCheckBuildStatus.
- Consider the performance implications of frequently checking this value in performance-critical code paths.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:212
Scope: file
Source code excerpt:
TAutoConsoleVariable<int32> CVarStreamingCheckBuildStatus(
TEXT("r.Streaming.CheckBuildStatus"),
0,
TEXT("If non-zero, the engine will check whether texture streaming needs rebuild."),
ECVF_Scalability);
TAutoConsoleVariable<int32> CVarStreamingUseMaterialData(
TEXT("r.Streaming.UseMaterialData"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarStreamingCheckBuildStatus
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingBuild.cpp:734
Scope (from outer to inner):
file
function void CheckTextureStreamingBuildValidity
Source code excerpt:
InWorld->NumTextureStreamingDirtyResources = 0;
if (CVarStreamingCheckBuildStatus.GetValueOnAnyThread() > 0)
{
for (int32 LevelIndex = 0; LevelIndex < InWorld->GetNumLevels(); LevelIndex++)
{
ULevel* Level = InWorld->GetLevel(LevelIndex);
if (!Level)
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:211
Scope: file
Source code excerpt:
ECVF_Scalability);
TAutoConsoleVariable<int32> CVarStreamingCheckBuildStatus(
TEXT("r.Streaming.CheckBuildStatus"),
0,
TEXT("If non-zero, the engine will check whether texture streaming needs rebuild."),
ECVF_Scalability);
TAutoConsoleVariable<int32> CVarStreamingUseMaterialData(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.h:61
Scope: file
Source code excerpt:
extern TAutoConsoleVariable<int32> CVarStreamingUseFixedPoolSize;
extern TAutoConsoleVariable<int32> CVarStreamingPoolSize;
extern TAutoConsoleVariable<int32> CVarStreamingCheckBuildStatus;
extern TAutoConsoleVariable<int32> CVarStreamingUseMaterialData;
extern TAutoConsoleVariable<int32> CVarStreamingNumStaticComponentsProcessedPerFrame;
extern TAutoConsoleVariable<int32> CVarStreamingDefragDynamicBounds;
extern TAutoConsoleVariable<float> CVarStreamingMaxTextureUVDensity;
extern TAutoConsoleVariable<int32> CVarStreamingLowResHandlingMode;