au.submix.clearbrokensubmixassets
au.submix.clearbrokensubmixassets
#Overview
name: au.submix.clearbrokensubmixassets
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If set, will verify that we don\'t have a submix that lists a child submix that is no longer its child, and the former children will not erroneously list their previous parents.\n0: Disable, >0: Enable
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.submix.clearbrokensubmixassets
is to manage the integrity of sound submix asset relationships in the Unreal Engine audio system. It’s specifically designed to address issues with broken or inconsistent parent-child relationships between submix assets.
This setting variable is primarily used in the Unreal Engine’s audio system, particularly within the sound submix functionality. It’s referenced in the Engine module, specifically in the SoundSubmix.cpp file.
The value of this variable is set through the console variable system in Unreal Engine. It’s initialized to 0 and can be changed at runtime using console commands.
The associated variable ClearBrokenSubmixAssetsCVar
directly interacts with au.submix.clearbrokensubmixassets
. They share the same value, with ClearBrokenSubmixAssetsCVar
being the C++ variable that’s used in the code to check the setting’s value.
Developers must be aware that:
- This variable is a boolean flag (0 for disabled, >0 for enabled).
- When enabled, it triggers a verification process for submix parent-child relationships.
- It’s used in the
USoundSubmixBase::PostLoad
function, which suggests it affects asset loading behavior.
Best practices when using this variable include:
- Use it for debugging or fixing issues with sound submix assets, not in regular production builds.
- Be cautious when enabling it, as it may affect performance during asset loading.
- After using it to fix broken submix relationships, disable it to avoid unnecessary checks.
Regarding the associated variable ClearBrokenSubmixAssetsCVar
:
- Its purpose is to provide a C++ accessible version of the console variable.
- It’s used directly in the Engine’s sound submix code to conditionally execute the relationship verification logic.
- The value is set by the console variable system, mirroring
au.submix.clearbrokensubmixassets
. - It interacts directly with the console variable, serving as its in-code representation.
- Developers should not modify this variable directly, but instead use the console variable system to change its value.
- Best practice is to treat this as a read-only variable in code and rely on the console variable for changes.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SoundSubmix.cpp:23
Scope: file
Source code excerpt:
static int32 ClearBrokenSubmixAssetsCVar = 0;
FAutoConsoleVariableRef CVarFixUpBrokenSubmixAssets(
TEXT("au.submix.clearbrokensubmixassets"),
ClearBrokenSubmixAssetsCVar,
TEXT("If set, will verify that we don't have a submix that lists a child submix that is no longer its child, and the former children will not erroneously list their previous parents.\n")
TEXT("0: Disable, >0: Enable"),
ECVF_Default);
namespace SoundSubmixPrivate
#Associated Variable and Callsites
This variable is associated with another variable named ClearBrokenSubmixAssetsCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SoundSubmix.cpp:21
Scope: file
Source code excerpt:
#include "SoundSubmixCustomVersion.h"
static int32 ClearBrokenSubmixAssetsCVar = 0;
FAutoConsoleVariableRef CVarFixUpBrokenSubmixAssets(
TEXT("au.submix.clearbrokensubmixassets"),
ClearBrokenSubmixAssetsCVar,
TEXT("If set, will verify that we don't have a submix that lists a child submix that is no longer its child, and the former children will not erroneously list their previous parents.\n")
TEXT("0: Disable, >0: Enable"),
ECVF_Default);
namespace SoundSubmixPrivate
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SoundSubmix.cpp:539
Scope (from outer to inner):
file
function void USoundSubmixBase::PostLoad
Source code excerpt:
Super::PostLoad();
if (ClearBrokenSubmixAssetsCVar)
{
for (int32 ChildIndex = ChildSubmixes.Num() - 1; ChildIndex >= 0; ChildIndex--)
{
USoundSubmixBase* ChildSubmix = ChildSubmixes[ChildIndex];
if (!ChildSubmix)