LevelStreaming.DefaultAllowClientUseMakingVisibleTransactionRequests

LevelStreaming.DefaultAllowClientUseMakingVisibleTransactionRequests

#Overview

name: LevelStreaming.DefaultAllowClientUseMakingVisibleTransactionRequests

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of LevelStreaming.DefaultAllowClientUseMakingVisibleTransactionRequests is to control whether clients should wait for server acknowledgment before making streaming levels visible in a networked game environment.

This setting variable is primarily used in the level streaming system of Unreal Engine. It’s part of the Engine module, specifically within the LevelStreaming functionality.

The value of this variable is set through the Unreal Engine’s console variable system. It’s defined as a boolean value, defaulting to false, and can be changed at runtime using console commands.

This variable interacts directly with its associated variable bDefaultAllowClientUseMakingVisibleTransactionRequests. They share the same value and purpose.

Developers must be aware that this variable affects the behavior of level streaming in multiplayer games. When enabled, it adds an extra step in the level streaming process where clients wait for server confirmation before making levels visible. This can impact the responsiveness of level streaming but may be necessary for maintaining consistency in certain networked scenarios.

Best practices when using this variable include:

  1. Consider enabling it in multiplayer games where strict synchronization between client and server is crucial.
  2. Be aware of the potential impact on player experience, as it may introduce slight delays in level visibility.
  3. Test thoroughly in various network conditions to ensure it doesn’t negatively impact gameplay.

Regarding the associated variable bDefaultAllowClientUseMakingVisibleTransactionRequests:

The purpose of this variable is identical to LevelStreaming.DefaultAllowClientUseMakingVisibleTransactionRequests. It’s the actual boolean variable that stores the setting’s value.

This variable is used within the LevelStreaming subsystem of the Engine module. It’s accessed through the ULevelStreaming class to determine the default behavior for client-side level visibility requests.

The value is set by the console variable system and can be accessed programmatically through the LevelStreamingCVars namespace.

There are no other variables that directly interact with it beyond the console variable it’s associated with.

Developers should be aware that this is the actual variable used in the engine code to determine the behavior. Changes to this variable will directly affect the level streaming system’s behavior in multiplayer scenarios.

Best practices for this variable are the same as for the console variable it’s associated with. Additionally, developers should avoid modifying this variable directly and instead use the console variable system to ensure proper synchronization and logging of changes.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/LevelStreaming.cpp:62

Scope (from outer to inner):

file
namespace    LevelStreamingCVars

Source code excerpt:

	static bool bDefaultAllowClientUseMakingVisibleTransactionRequests = false;
	FAutoConsoleVariableRef CVarDefaultAllowClientUseMakingVisibleTransactionRequests(
		TEXT("LevelStreaming.DefaultAllowClientUseMakingVisibleTransactionRequests"),
		bDefaultAllowClientUseMakingVisibleTransactionRequests,
		TEXT("Flag combined with world support to use making visible 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 visible.\n")
		TEXT("0: Disable, 1: Enable"),
		ECVF_Default);

#Associated Variable and Callsites

This variable is associated with another variable named bDefaultAllowClientUseMakingVisibleTransactionRequests. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/LevelStreaming.cpp:60

Scope (from outer to inner):

file
namespace    LevelStreamingCVars

Source code excerpt:

		ECVF_Default);

	static bool bDefaultAllowClientUseMakingVisibleTransactionRequests = false;
	FAutoConsoleVariableRef CVarDefaultAllowClientUseMakingVisibleTransactionRequests(
		TEXT("LevelStreaming.DefaultAllowClientUseMakingVisibleTransactionRequests"),
		bDefaultAllowClientUseMakingVisibleTransactionRequests,
		TEXT("Flag combined with world support to use making visible 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 visible.\n")
		TEXT("0: Disable, 1: Enable"),
		ECVF_Default);

#if UE_WITH_IRIS

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/LevelStreaming.cpp:97

Scope (from outer to inner):

file
function     bool ULevelStreaming::DefaultAllowClientUseMakingVisibleTransactionRequests

Source code excerpt:

bool ULevelStreaming::DefaultAllowClientUseMakingVisibleTransactionRequests()
{
	return LevelStreamingCVars::bDefaultAllowClientUseMakingVisibleTransactionRequests;
}

bool ULevelStreaming::ShouldClientUseMakingInvisibleTransactionRequest() const
{
	if (!bSkipClientUseMakingInvisibleTransactionRequest)
	{