au.MetaSound.Editor.AsyncRegistrationEnabled

au.MetaSound.Editor.AsyncRegistrationEnabled

#Overview

name: au.MetaSound.Editor.AsyncRegistrationEnabled

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 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:

  1. This setting affects the editor’s startup performance and behavior regarding MetaSound assets.
  2. 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.
  3. 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:

  1. Leave it enabled (default) unless specific issues arise with MetaSound asset availability during editor startup.
  2. 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.
  3. 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:

#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)
					{