p.Chaos.DebugDraw.GeometryCollectionReplication
p.Chaos.DebugDraw.GeometryCollectionReplication
#Overview
name: p.Chaos.DebugDraw.GeometryCollectionReplication
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If true debug draw deltas and corrections for geometry collection replication
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.Chaos.DebugDraw.GeometryCollectionReplication is to enable debug drawing for geometry collection replication in Unreal Engine’s Chaos physics system. This setting variable is specifically designed for debugging and visualizing the replication process of geometry collections.
This setting variable is primarily used in the Experimental GeometryCollectionEngine module, which is part of Unreal Engine’s Chaos physics system. It is referenced in the GeometryCollectionComponent.cpp file, indicating its relevance to the geometry collection functionality.
The value of this variable is set through the Unreal Engine console variable system. It is defined as a boolean value, initialized to 0 (false) by default.
The associated variable bGeometryCollectionDebugDrawRep interacts directly with p.Chaos.DebugDraw.GeometryCollectionReplication. They share the same value and are used interchangeably in the code.
Developers must be aware that this variable is intended for debugging purposes only. Enabling it may have performance implications, so it should be used judiciously, particularly in production environments.
Best practices when using this variable include:
- Only enable it when actively debugging geometry collection replication issues.
- Disable it in release builds or when performance is a concern.
- Use it in conjunction with other debugging tools to get a comprehensive view of the replication process.
Regarding the associated variable bGeometryCollectionDebugDrawRep:
The purpose of bGeometryCollectionDebugDrawRep is to serve as an internal boolean flag for the debug drawing functionality of geometry collection replication.
This variable is used within the GeometryCollectionComponent class, specifically in the ProcessRepData function. It controls whether debug information for deltas and corrections in geometry collection replication should be drawn.
The value of this variable is set by the console variable p.Chaos.DebugDraw.GeometryCollectionReplication, ensuring they always have the same value.
Developers should be aware that this variable is used in conditional statements to control debug drawing. When enabled, it may cause additional processing and rendering overhead.
Best practices for using bGeometryCollectionDebugDrawRep include:
- Use it in development and testing environments only.
- Combine it with other debugging techniques to get a complete picture of the replication process.
- Remember to disable it when not actively debugging to avoid unnecessary performance impact.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionComponent.cpp:2500
Scope: file
Source code excerpt:
bool bGeometryCollectionDebugDrawRep = 0;
FAutoConsoleVariableRef CVarGeometryCollectionDebugDrawRep(TEXT("p.Chaos.DebugDraw.GeometryCollectionReplication"), bGeometryCollectionDebugDrawRep,
TEXT("If true debug draw deltas and corrections for geometry collection replication"));
bool bGeometryCollectionRepUseClusterVelocityMatch = true;
FAutoConsoleVariableRef CVarGeometryCollectionRepUseClusterVelocityMatch(TEXT("p.bGeometryCollectionRepUseClusterVelocityMatch"), bGeometryCollectionRepUseClusterVelocityMatch,
TEXT("Use physical velocity to match cluster states"));
#Associated Variable and Callsites
This variable is associated with another variable named bGeometryCollectionDebugDrawRep
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionComponent.cpp:2499
Scope: file
Source code excerpt:
FAutoConsoleVariableRef CVarGeometryCollectionRepMaxExtrapolationTime(TEXT("p.GeometryCollectionRepMaxExtrapolationTime"), GeometryCollectionRepMaxExtrapolationTime, TEXT("Number of seconds that replicated physics data will persist for a GC, extrapolating velocities"));
bool bGeometryCollectionDebugDrawRep = 0;
FAutoConsoleVariableRef CVarGeometryCollectionDebugDrawRep(TEXT("p.Chaos.DebugDraw.GeometryCollectionReplication"), bGeometryCollectionDebugDrawRep,
TEXT("If true debug draw deltas and corrections for geometry collection replication"));
bool bGeometryCollectionRepUseClusterVelocityMatch = true;
FAutoConsoleVariableRef CVarGeometryCollectionRepUseClusterVelocityMatch(TEXT("p.bGeometryCollectionRepUseClusterVelocityMatch"), bGeometryCollectionRepUseClusterVelocityMatch,
TEXT("Use physical velocity to match cluster states"));
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionComponent.cpp:2930
Scope (from outer to inner):
file
function bool UGeometryCollectionComponent::ProcessRepData
Source code excerpt:
#if ENABLE_DRAW_DEBUG
if (bGeometryCollectionDebugDrawRep)
{
// Track the sim time that this rep data was received on.
if (!RepData.RepDataReceivedTime.IsSet())
{
RepData.RepDataReceivedTime = SimTime;
}