demo.DecreaseRepPrioritizeThreshold
demo.DecreaseRepPrioritizeThreshold
#Overview
name: demo.DecreaseRepPrioritizeThreshold
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
The % of Replicated to Prioritized actors at which prioritize time will be increased.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of demo.DecreaseRepPrioritizeThreshold is to control the dynamic adjustment of actor prioritization time in Unreal Engine’s demo recording and playback system. It sets a threshold for increasing the time spent on prioritizing actors during demo recording or playback.
This setting variable is primarily used in the demo recording and playback subsystem of Unreal Engine, specifically within the DemoNetDriver module. It’s part of a set of variables that work together to manage the balance between replication and prioritization of actors in demo recordings.
The value of this variable is set as a console variable (CVar) with a default value of 0.7 (70%). It can be modified at runtime through the console or configuration files.
This variable interacts closely with several other variables:
- CVarDemoIncreaseRepPrioritizeThreshold
- CVarDemoMinimumRepPrioritizeTime
- CVarDemoMaximumRepPrioritizeTime
These variables work together to dynamically adjust the time spent on prioritizing actors based on the ratio of replicated to prioritized actors.
Developers must be aware that this variable is part of a performance optimization system. Adjusting it can affect the balance between network performance and the accuracy of actor prioritization in demo recordings. Improper settings may lead to suboptimal demo playback or recording quality.
Best practices when using this variable include:
- Keeping it in balance with CVarDemoIncreaseRepPrioritizeThreshold
- Testing thoroughly after any adjustments to ensure optimal demo recording and playback
- Considering the specific needs of your game when adjusting these values
Regarding the associated variable CVarDemoDecreaseRepPrioritizeThreshold:
The purpose of CVarDemoDecreaseRepPrioritizeThreshold is to set the threshold at which the time spent on prioritizing actors will be increased. It works in tandem with demo.DecreaseRepPrioritizeThreshold to manage the dynamic adjustment of prioritization time.
This variable is used in the same subsystem (DemoNetDriver) and is typically adjusted alongside demo.DecreaseRepPrioritizeThreshold to maintain a balanced approach to actor prioritization.
The value is also set as a console variable with a default value of 0.7 (70%).
It interacts directly with demo.DecreaseRepPrioritizeThreshold, and their values are compared and potentially swapped to ensure correct threshold ordering.
Developers should be aware that these two variables should be set in relation to each other, with the decrease threshold typically being lower than the increase threshold.
Best practices include:
- Ensuring CVarDemoDecreaseRepPrioritizeThreshold is lower than CVarDemoIncreaseRepPrioritizeThreshold
- Adjusting both variables together when fine-tuning demo recording and playback performance
- Monitoring the impact of changes on both network performance and demo quality
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/DemoNetDriver.cpp:83
Scope: file
Source code excerpt:
static TAutoConsoleVariable<float> CVarDemoIncreaseRepPrioritizeThreshold(TEXT("demo.IncreaseRepPrioritizeThreshold"), 0.9, TEXT("The % of Replicated to Prioritized actors at which prioritize time will be decreased."));
static TAutoConsoleVariable<float> CVarDemoDecreaseRepPrioritizeThreshold(TEXT("demo.DecreaseRepPrioritizeThreshold"), 0.7, TEXT("The % of Replicated to Prioritized actors at which prioritize time will be increased."));
static TAutoConsoleVariable<float> CVarDemoMinimumRepPrioritizeTime(TEXT("demo.MinimumRepPrioritizePercent"), 0.3, TEXT("Minimum percent of time that must be spent prioritizing actors, regardless of throttling."));
static TAutoConsoleVariable<float> CVarDemoMaximumRepPrioritizeTime(TEXT("demo.MaximumRepPrioritizePercent"), 0.7, TEXT("Maximum percent of time that may be spent prioritizing actors, regardless of throttling."));
static TAutoConsoleVariable<int32> CVarFastForwardLevelsPausePlayback(TEXT("demo.FastForwardLevelsPausePlayback"), 0, TEXT("If true, pause channels and playback while fast forward levels task is running."));
namespace ReplayTaskNames
#Associated Variable and Callsites
This variable is associated with another variable named CVarDemoDecreaseRepPrioritizeThreshold
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/DemoNetDriver.cpp:83
Scope: file
Source code excerpt:
static TAutoConsoleVariable<float> CVarDemoIncreaseRepPrioritizeThreshold(TEXT("demo.IncreaseRepPrioritizeThreshold"), 0.9, TEXT("The % of Replicated to Prioritized actors at which prioritize time will be decreased."));
static TAutoConsoleVariable<float> CVarDemoDecreaseRepPrioritizeThreshold(TEXT("demo.DecreaseRepPrioritizeThreshold"), 0.7, TEXT("The % of Replicated to Prioritized actors at which prioritize time will be increased."));
static TAutoConsoleVariable<float> CVarDemoMinimumRepPrioritizeTime(TEXT("demo.MinimumRepPrioritizePercent"), 0.3, TEXT("Minimum percent of time that must be spent prioritizing actors, regardless of throttling."));
static TAutoConsoleVariable<float> CVarDemoMaximumRepPrioritizeTime(TEXT("demo.MaximumRepPrioritizePercent"), 0.7, TEXT("Maximum percent of time that may be spent prioritizing actors, regardless of throttling."));
static TAutoConsoleVariable<int32> CVarFastForwardLevelsPausePlayback(TEXT("demo.FastForwardLevelsPausePlayback"), 0, TEXT("If true, pause channels and playback while fast forward levels task is running."));
namespace ReplayTaskNames
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/DemoNetDriver.cpp:5520
Scope (from outer to inner):
file
function void UDemoNetDriver::AdjustConsiderTime
Source code excerpt:
};
float DecreaseThreshold = CVarDemoDecreaseRepPrioritizeThreshold.GetValueOnAnyThread();
float IncreaseThreshold = CVarDemoIncreaseRepPrioritizeThreshold.GetValueOnAnyThread();
ConditionallySwap(DecreaseThreshold, IncreaseThreshold);
float MinRepTime = CVarDemoMinimumRepPrioritizeTime.GetValueOnAnyThread();
float MaxRepTime = CVarDemoMaximumRepPrioritizeTime.GetValueOnAnyThread();
ConditionallySwap(MinRepTime, MaxRepTime);