LevelStreaming.DefaultAllowClientUseMakingInvisibleTransactionRequests
LevelStreaming.DefaultAllowClientUseMakingInvisibleTransactionRequests
#Overview
name: LevelStreaming.DefaultAllowClientUseMakingInvisibleTransactionRequests
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Flag combined with world support to use making invisible transaction requests to the server\nthat determines whether the client should wait for the server to acknowledge visibility update before making streaming levels invisible.\n0: Disable, 1: Enable
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of LevelStreaming.DefaultAllowClientUseMakingInvisibleTransactionRequests is to control whether clients should wait for server acknowledgment before making streaming levels invisible during level streaming operations.
This setting variable is primarily used by the level streaming system in Unreal Engine 5. It is part of the Engine module, specifically within the LevelStreaming functionality.
The value of this variable is set through a console variable (CVar) system. It’s defined using FAutoConsoleVariableRef, which allows it to be changed at runtime through console commands or configuration files.
The associated variable bDefaultAllowClientUseMakingInvisibleTransactionRequests directly interacts with it. They share the same value and purpose.
Developers must be aware that this variable’s behavior differs depending on whether the Iris networking system is enabled. By default, it’s set to true when UE_WITH_IRIS is defined, and false otherwise.
Best practices when using this variable include:
- Understanding the implications of enabling or disabling this feature on network performance and gameplay synchronization.
- Testing thoroughly in multiplayer scenarios to ensure proper level streaming behavior.
- Considering the trade-offs between immediate client-side visibility changes and waiting for server acknowledgment.
Regarding the associated variable bDefaultAllowClientUseMakingInvisibleTransactionRequests:
Its purpose is identical to the console variable - it determines whether clients should wait for server acknowledgment before making streaming levels invisible.
This variable is used within the LevelStreaming subsystem of the Engine module. It’s accessed through the ULevelStreaming::DefaultAllowClientUseMakingInvisibleTransactionRequests() function, which suggests it’s part of the public API for level streaming operations.
The value is set based on the console variable, allowing for runtime configuration.
Developers should be aware that this variable is part of a broader system for managing level streaming transactions between client and server. It works in tandem with a similar variable for making levels visible (bDefaultAllowClientUseMakingVisibleTransactionRequests).
Best practices include:
- Using this variable in conjunction with other level streaming settings for a cohesive streaming strategy.
- Considering the network implications when changing this setting, especially in multiplayer games.
- Testing different configurations to find the optimal balance between responsiveness and network efficiency for your specific game requirements.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/LevelStreaming.cpp:53
Scope (from outer to inner):
file
namespace LevelStreamingCVars
Source code excerpt:
#endif
FAutoConsoleVariableRef CVarDefaultAllowClientUseMakingInvisibleTransactionRequests(
TEXT("LevelStreaming.DefaultAllowClientUseMakingInvisibleTransactionRequests"),
bDefaultAllowClientUseMakingInvisibleTransactionRequests,
TEXT("Flag combined with world support to use making invisible transaction requests to the server\n")
TEXT("that determines whether the client should wait for the server to acknowledge visibility update before making streaming levels invisible.\n")
TEXT("0: Disable, 1: Enable"),
ECVF_Default);
#Associated Variable and Callsites
This variable is associated with another variable named bDefaultAllowClientUseMakingInvisibleTransactionRequests
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/LevelStreaming.cpp:48
Scope (from outer to inner):
file
namespace LevelStreamingCVars
Source code excerpt:
// to mitigate this problem we assign a TransactionId to each request/update to make sure that we are acting on the correct data
#if UE_WITH_IRIS
static bool bDefaultAllowClientUseMakingInvisibleTransactionRequests = true;
#else
static bool bDefaultAllowClientUseMakingInvisibleTransactionRequests = false;
#endif
FAutoConsoleVariableRef CVarDefaultAllowClientUseMakingInvisibleTransactionRequests(
TEXT("LevelStreaming.DefaultAllowClientUseMakingInvisibleTransactionRequests"),
bDefaultAllowClientUseMakingInvisibleTransactionRequests,
TEXT("Flag combined with world support to use making invisible transaction requests to the server\n")
TEXT("that determines whether the client should wait for the server to acknowledge visibility update before making streaming levels invisible.\n")
TEXT("0: Disable, 1: Enable"),
ECVF_Default);
static bool bDefaultAllowClientUseMakingVisibleTransactionRequests = false;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/LevelStreaming.cpp:92
Scope (from outer to inner):
file
function bool ULevelStreaming::DefaultAllowClientUseMakingInvisibleTransactionRequests
Source code excerpt:
bool ULevelStreaming::DefaultAllowClientUseMakingInvisibleTransactionRequests()
{
return LevelStreamingCVars::bDefaultAllowClientUseMakingInvisibleTransactionRequests;
}
bool ULevelStreaming::DefaultAllowClientUseMakingVisibleTransactionRequests()
{
return LevelStreamingCVars::bDefaultAllowClientUseMakingVisibleTransactionRequests;
}