au.MetaSound.Editor.AsyncRegistrationEnabled
au.MetaSound.Editor.AsyncRegistrationEnabled
#Overview
name: au.MetaSound.Editor.AsyncRegistrationEnabled
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable registering all MetaSound asset classes asyncronously on editor load.\n0: Disabled, !0: Enabled (default)
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.MetaSound.Editor.AsyncRegistrationEnabled is to control whether MetaSound asset classes are registered asynchronously when the editor loads.
This setting variable is primarily used by the MetaSound editor module, which is part of the Unreal Engine’s audio system, specifically the MetaSound plugin. The MetaSound system is an advanced audio generation and processing framework in Unreal Engine 5.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1 (enabled) and can be changed at runtime through the console or configuration files.
The associated variable MetaSoundEditorAsyncRegistrationEnabledCVar directly interacts with au.MetaSound.Editor.AsyncRegistrationEnabled. They share the same value, with the CVar acting as the interface for changing the setting, and the associated variable being used in the actual code logic.
Developers should be aware that:
- This setting affects the editor’s startup performance and behavior regarding MetaSound assets.
- When enabled (non-zero value), MetaSound asset classes will be registered asynchronously, which can improve editor load times but might delay the availability of these assets.
- When disabled (zero value), the registration process will be synchronous, which might lead to longer editor startup times but ensures immediate availability of MetaSound assets.
Best practices when using this variable include:
- Leave it enabled (default) unless specific issues arise with MetaSound asset availability during editor startup.
- If experiencing issues with MetaSound assets not being immediately available when needed, consider disabling this setting for a more predictable, albeit potentially slower, startup process.
- Monitor editor startup performance and MetaSound asset availability when changing this setting to find the optimal configuration for your project.
Regarding the associated variable MetaSoundEditorAsyncRegistrationEnabledCVar:
- Its purpose is to provide a direct, in-code reference to the au.MetaSound.Editor.AsyncRegistrationEnabled setting.
- It’s used within the MetaSound editor module to conditionally execute code based on whether async registration is enabled.
- The value is set through the CVar system and is read directly in the code where async registration logic is implemented.
- Developers should not modify this variable directly in code, but instead use the CVar system to change its value if needed.
- Best practice is to treat this as a read-only variable in code and rely on the CVar system for any runtime changes to the setting.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorModule.cpp:56
Scope: file
Source code excerpt:
static int32 MetaSoundEditorAsyncRegistrationEnabledCVar = 1;
FAutoConsoleVariableRef CVarMetaSoundEditorAsyncRegistrationEnabled(
TEXT("au.MetaSound.Editor.AsyncRegistrationEnabled"),
MetaSoundEditorAsyncRegistrationEnabledCVar,
TEXT("Enable registering all MetaSound asset classes asyncronously on editor load.\n")
TEXT("0: Disabled, !0: Enabled (default)"),
ECVF_Default);
// Forward declarations
#Associated Variable and Callsites
This variable is associated with another variable named MetaSoundEditorAsyncRegistrationEnabledCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorModule.cpp:54
Scope: file
Source code excerpt:
static int32 MetaSoundEditorAsyncRegistrationEnabledCVar = 1;
FAutoConsoleVariableRef CVarMetaSoundEditorAsyncRegistrationEnabled(
TEXT("au.MetaSound.Editor.AsyncRegistrationEnabled"),
MetaSoundEditorAsyncRegistrationEnabledCVar,
TEXT("Enable registering all MetaSound asset classes asyncronously on editor load.\n")
TEXT("0: Disabled, !0: Enabled (default)"),
ECVF_Default);
// Forward declarations
class UMetasoundInterfacesView;
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorModule.cpp:264
Scope (from outer to inner):
file
namespace Metasound
namespace Editor
class class FModule : public IMetasoundEditorModule
function void LoadAndRegisterAsset
Source code excerpt:
else
{
if (!MetaSoundEditorAsyncRegistrationEnabledCVar)
{
return;
}
if (AssetPrimeStatus == EAssetPrimeStatus::NotRequested)
{