p.Chaos.DebugDraw.ShowPIEClient

p.Chaos.DebugDraw.ShowPIEClient

#Overview

name: p.Chaos.DebugDraw.ShowPIEClient

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 p.Chaos.DebugDraw.ShowPIEClient is to control the visibility of client-side debug drawing in Play-In-Editor (PIE) mode for the Chaos physics system in Unreal Engine 5.

This setting variable is primarily used by the Chaos physics system, specifically in the debug drawing functionality of the ChaosSolverEngine module. It’s part of the debugging and visualization tools for the Chaos physics simulation.

The value of this variable is set using an FAutoConsoleVariableRef, which creates a console variable that can be modified at runtime. It’s initialized to true by default, meaning client-side debug drawing is enabled in PIE mode.

The associated variable ChaosDebugDraw_ShowPIEClient directly interacts with p.Chaos.DebugDraw.ShowPIEClient. They share the same value and are used interchangeably in the code.

Developers should be aware that this variable only affects debug drawing in PIE mode and specifically for the client-side view. There’s a separate variable (p.Chaos.DebugDraw.ShowPIEServer) for server-side debug drawing.

Best practices when using this variable include:

  1. Use it in conjunction with p.Chaos.DebugDraw.ShowPIEServer for a complete view of the physics simulation in multiplayer scenarios.
  2. Be aware that enabling debug drawing can impact performance, so it should be used judiciously, especially in performance-critical situations.
  3. Remember to disable it when not needed, as debug drawing can clutter the view and potentially obscure important game elements.

Regarding the associated variable ChaosDebugDraw_ShowPIEClient:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/ChaosSolverEngine/Private/Chaos/ChaosDebugDrawComponent.cpp:49

Scope: file

Source code excerpt:


float ChaosDebugDraw_ShowPIEClient = true;
FAutoConsoleVariableRef CVarChaos_DebugDraw_ShowPIEClient(TEXT("p.Chaos.DebugDraw.ShowPIEClient"), ChaosDebugDraw_ShowPIEClient, TEXT("When running in PIE mode, show the client debug draw"));

int bChaosDebugDraw_DrawMode = 0;
FAutoConsoleVariableRef CVarArrowSize(TEXT("p.Chaos.DebugDraw.Mode"), bChaosDebugDraw_DrawMode, TEXT("Where to send debug draw commands. 0 = UE Debug Draw; 1 = VisLog; 2 = Both"));


float CommandLifeTime(const Chaos::FLatentDrawCommand& Command, const bool bIsPaused)

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/ChaosSolverEngine/Private/Chaos/ChaosDebugDrawComponent.cpp:48

Scope: file

Source code excerpt:

FAutoConsoleVariableRef CVarChaos_DebugDraw_ShowPIEServer(TEXT("p.Chaos.DebugDraw.ShowPIEServer"), ChaosDebugDraw_ShowPIEServer, TEXT("When running in PIE mode, show the server debug draw"));

float ChaosDebugDraw_ShowPIEClient = true;
FAutoConsoleVariableRef CVarChaos_DebugDraw_ShowPIEClient(TEXT("p.Chaos.DebugDraw.ShowPIEClient"), ChaosDebugDraw_ShowPIEClient, TEXT("When running in PIE mode, show the client debug draw"));

int bChaosDebugDraw_DrawMode = 0;
FAutoConsoleVariableRef CVarArrowSize(TEXT("p.Chaos.DebugDraw.Mode"), bChaosDebugDraw_DrawMode, TEXT("Where to send debug draw commands. 0 = UE Debug Draw; 1 = VisLog; 2 = Both"));


float CommandLifeTime(const Chaos::FLatentDrawCommand& Command, const bool bIsPaused)

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/ChaosSolverEngine/Private/Chaos/ChaosDebugDrawComponent.cpp:99

Scope (from outer to inner):

file
function     void DebugDrawChaos

Source code excerpt:

	}

	if ((World->GetNetMode() != NM_DedicatedServer) && !ChaosDebugDraw_ShowPIEClient)
	{
		return;
	}

	// Draw all the captured elements in the viewport
	const bool bDrawUe = bChaosDebugDraw_DrawMode != 1;