ts.debug.TotalDebugRecentRequestsTracked
ts.debug.TotalDebugRecentRequestsTracked
#Overview
name: ts.debug.TotalDebugRecentRequestsTracked
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Sets the total # of targeting requests that will be tracked upon starting of them (default = 5)
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ts.debug.TotalDebugRecentRequestsTracked is to set the total number of targeting requests that will be tracked upon starting them in the Gameplay Targeting System. This variable is used for debugging purposes in the Targeting Subsystem.
This setting variable is primarily used in the Gameplay Targeting System plugin, specifically within the Targeting Subsystem module. It’s referenced in the TargetingSubsystem.cpp file.
The value of this variable is set using an FAutoConsoleVariableRef, which allows it to be modified at runtime through console commands. The default value is 5.
The associated variable TotalDebugRecentRequestsTracked interacts directly with ts.debug.TotalDebugRecentRequestsTracked. They share the same value, with TotalDebugRecentRequestsTracked being the actual int32 variable used in the code.
Developers must be aware that this variable affects the debugging capabilities of the Targeting Subsystem. It determines the number of recent targeting requests (both immediate and async) that are stored for debugging purposes. Changing this value will affect the amount of debug information available.
Best practices when using this variable include:
- Adjust the value based on debugging needs. Increase it if more historical data is required for troubleshooting.
- Be mindful of potential performance impacts when setting very large values, as it may increase memory usage.
- Use in conjunction with other debugging tools and variables in the Targeting Subsystem for comprehensive debugging.
Regarding the associated variable TotalDebugRecentRequestsTracked:
- It’s used directly in the UTargetingSubsystem class methods for managing debug-tracked targeting requests.
- It determines the size of the DebugTrackedImmediateTargetRequests and DebugTrackedAsyncTargetRequests arrays.
- When the number of tracked requests exceeds this value, the oldest requests are overwritten in a circular buffer fashion.
- Developers should use this variable when implementing or extending debug functionality in the Targeting Subsystem.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Experimental/GameplayTargetingSystem/Source/GameplayTargetingSystem/Private/TargetingSystem/TargetingSubsystem.cpp:61
Scope (from outer to inner):
file
namespace TargetingSystemCVars
Source code excerpt:
static int32 TotalDebugRecentRequestsTracked = 5;
FAutoConsoleVariableRef CvarTotalDebugRecentRequestsTracked(
TEXT("ts.debug.TotalDebugRecentRequestsTracked"),
TotalDebugRecentRequestsTracked,
TEXT("Sets the total # of targeting requests that will be tracked upon starting of them (default = 5)")
);
static float OverrideTargetingLifeTime = 0.f;
FAutoConsoleVariableRef CvarOverrideTargetingLifeTime(
#Associated Variable and Callsites
This variable is associated with another variable named TotalDebugRecentRequestsTracked
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Experimental/GameplayTargetingSystem/Source/GameplayTargetingSystem/Private/TargetingSystem/TargetingSubsystem.cpp:59
Scope (from outer to inner):
file
namespace TargetingSystemCVars
Source code excerpt:
);
static int32 TotalDebugRecentRequestsTracked = 5;
FAutoConsoleVariableRef CvarTotalDebugRecentRequestsTracked(
TEXT("ts.debug.TotalDebugRecentRequestsTracked"),
TotalDebugRecentRequestsTracked,
TEXT("Sets the total # of targeting requests that will be tracked upon starting of them (default = 5)")
);
static float OverrideTargetingLifeTime = 0.f;
FAutoConsoleVariableRef CvarOverrideTargetingLifeTime(
TEXT("ts.debug.OverrideTargetingLifeTime"),
#Loc: <Workspace>/Engine/Plugins/Experimental/GameplayTargetingSystem/Source/GameplayTargetingSystem/Private/TargetingSystem/TargetingSubsystem.cpp:993
Scope (from outer to inner):
file
function void UTargetingSubsystem::AddDebugTrackedImmediateTargetRequests
Source code excerpt:
{
int32 Index = CurrentImmediateRequestIndex++;
if (Index >= TargetingSystemCVars::TotalDebugRecentRequestsTracked)
{
Index = 0;
CurrentImmediateRequestIndex = 0;
}
if (!DebugTrackedImmediateTargetRequests.IsValidIndex(Index))
{
DebugTrackedImmediateTargetRequests.SetNumZeroed(TargetingSystemCVars::TotalDebugRecentRequestsTracked);
}
FTargetingRequestHandle PreviousHandle = DebugTrackedImmediateTargetRequests[Index];
ReleaseTargetRequestHandle(PreviousHandle);
DebugTrackedImmediateTargetRequests[Index] = TargetingHandle;
#Loc: <Workspace>/Engine/Plugins/Experimental/GameplayTargetingSystem/Source/GameplayTargetingSystem/Private/TargetingSystem/TargetingSubsystem.cpp:1013
Scope (from outer to inner):
file
function void UTargetingSubsystem::AddDebugTrackedAsyncTargetRequests
Source code excerpt:
{
int32 Index = CurrentAsyncRequestIndex++;
if (Index >= TargetingSystemCVars::TotalDebugRecentRequestsTracked)
{
Index = 0;
CurrentAsyncRequestIndex = 0;
}
if (!DebugTrackedAsyncTargetRequests.IsValidIndex(Index))
{
DebugTrackedAsyncTargetRequests.SetNumZeroed(TargetingSystemCVars::TotalDebugRecentRequestsTracked);
}
FTargetingRequestHandle PreviousHandle = DebugTrackedAsyncTargetRequests[Index];
ReleaseTargetRequestHandle(PreviousHandle);
DebugTrackedAsyncTargetRequests[Index] = TargetingHandle;