au.Debug.SoundCues.Spacing.Char
au.Debug.SoundCues.Spacing.Char
#Overview
name: au.Debug.SoundCues.Spacing.Char
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Size of character (in pixels) with compact view. \nDefault: 7
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.Debug.SoundCues.Spacing.Char is to control the size of characters (in pixels) when displaying debug information for Sound Cues in a compact view within Unreal Engine’s audio debugging system.
This setting variable is primarily used in the Engine’s audio debugging subsystem. It is referenced in the AudioDebug.cpp file, which is part of the Engine’s runtime module.
The value of this variable is set using an FAutoConsoleVariableRef, which creates a console variable that can be adjusted at runtime. It is initialized with a default value of 7 pixels.
The associated variable SoundCueDebugCharSpacingCVar directly interacts with au.Debug.SoundCues.Spacing.Char. They share the same value, and SoundCueDebugCharSpacingCVar is used in the actual code implementation.
Developers should be aware that this variable affects the visual representation of debug information for Sound Cues. Adjusting this value will change the spacing between characters in the debug display, which can affect readability.
Best practices when using this variable include:
- Keeping the value within a reasonable range to ensure legibility.
- Adjusting it in conjunction with other debug display settings for optimal visibility.
- Using it primarily for debugging purposes and not relying on it for core gameplay functionality.
Regarding the associated variable SoundCueDebugCharSpacingCVar:
The purpose of SoundCueDebugCharSpacingCVar is to store the actual value used in the code for character spacing in Sound Cue debug displays.
This variable is used directly in the FAudioDebugger::RenderStatCues function within the Audio namespace. It determines the pixel spacing between characters when rendering debug statistics for Sound Cues.
The value of SoundCueDebugCharSpacingCVar is set by the au.Debug.SoundCues.Spacing.Char console variable.
It interacts with other debugging variables, such as SoundCueDebugTabSpacingCVar, to calculate the overall layout of the debug display.
Developers should be aware that this variable is clamped to a minimum value of 1 to prevent potential rendering issues with zero or negative spacing.
Best practices for using SoundCueDebugCharSpacingCVar include:
- Accessing it through the console variable au.Debug.SoundCues.Spacing.Char for consistency.
- Considering its impact on other spacing calculations in the debug rendering process.
- Using it in conjunction with other debug variables to achieve the desired debug display layout.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDebug.cpp:134
Scope: file
Source code excerpt:
static int32 SoundCueDebugCharSpacingCVar = 7;
FAutoConsoleVariableRef CVarSoundCueDebugCharSpacing(
TEXT("au.Debug.SoundCues.Spacing.Char"),
SoundCueDebugCharSpacingCVar,
TEXT("Size of character (in pixels) with compact view. \n")
TEXT("Default: 7"),
ECVF_Default);
static int32 SoundDebugDisplayCornerXCVar = 100;
#Associated Variable and Callsites
This variable is associated with another variable named SoundCueDebugCharSpacingCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDebug.cpp:132
Scope: file
Source code excerpt:
ECVF_Default);
static int32 SoundCueDebugCharSpacingCVar = 7;
FAutoConsoleVariableRef CVarSoundCueDebugCharSpacing(
TEXT("au.Debug.SoundCues.Spacing.Char"),
SoundCueDebugCharSpacingCVar,
TEXT("Size of character (in pixels) with compact view. \n")
TEXT("Default: 7"),
ECVF_Default);
static int32 SoundDebugDisplayCornerXCVar = 100;
FAutoConsoleVariableRef CVarSoundDebugDisplayCornerX(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AudioDebug.cpp:1528
Scope (from outer to inner):
file
namespace Audio
function int32 FAudioDebugger::RenderStatCues
Source code excerpt:
const int32 TabSpacing = FMath::Clamp(SoundCueDebugTabSpacingCVar, 1, SoundCueDebugTabSpacingCVar);
const int32 CharSpacing = FMath::Clamp(SoundCueDebugCharSpacingCVar, 1, SoundCueDebugCharSpacingCVar);
const int32 NumberSpacing = 6 * CharSpacing; // 6 character len for 2 decimal float + 2 spaces 'X.XX '
// Tab out name and class length and reset previous length counters
int32 TabbedName = (PrevNameLength / TabSpacing + 1) * TabSpacing;
int32 TabbedClass = (PrevClassLength / TabSpacing + 1) * TabSpacing;
PrevNameLength = PrevClassLength = 0;