Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundEngine/Private/MetasoundEngineModule.cpp
maxwell hayes 64793de0af Fix for static init issu w/ FNames in metasound node registration
#ROBOMERGE-SOURCE: CL 15619052 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15619065 by maxwell hayes in ue5-main branch]
2021-03-04 19:23:41 -04:00

36 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MetasoundEngineModule.h"
#include "Metasound.h"
#include "MetasoundDataReference.h"
#include "MetasoundDataTypeRegistrationMacro.h"
#include "MetasoundSource.h"
#include "MetasoundUObjectRegistry.h"
#include "MetasoundWave.h"
#include "Modules/ModuleManager.h"
DEFINE_LOG_CATEGORY(LogMetasoundEngine);
REGISTER_METASOUND_DATATYPE(Metasound::FWaveAsset, "WaveAsset", Metasound::ELiteralType::UObjectProxy, USoundWave);
class FMetasoundEngineModule : public IMetasoundEngineModule
{
virtual void StartupModule() override
{
// If there is no archetype name, use UMetasound
Metasound::IMetasoundUObjectRegistry::RegisterUClassArchetype<UMetasound>(TEXT(""));
// Register preferred archetypes
Metasound::IMetasoundUObjectRegistry::RegisterUClassPreferredArchetypes<UMetasoundSource>();
// flush node regsitration queue
FMetasoundFrontendRegistryContainer::Get()->RegisterPendingNodes();
FModuleManager::Get().LoadModuleChecked(TEXT("AudioCodecEngine"));
UE_LOG(LogMetasoundEngine, Log, TEXT("Metasound Engine Initialized"));
}
};
IMPLEMENT_MODULE(FMetasoundEngineModule, MetasoundEngine);