Files
UnrealEngineUWP/Engine/Plugins/Runtime/ModelViewViewModel/Source/ModelViewViewModelBlueprint/Private/ModelViewViewModelBlueprintModule.cpp
bob tellez 953cc7733b [Backout] - CL25027663
[FYI] Patrick.Boutot
Original CL Desc
-----------------------------------------------------------------
MVVM: Remove the specialized viewmodel editor and use the Blueprint base editor instead.
#jira UE-182297
#preflight 64381b51df20983c41604681

[CL 25035582 by bob tellez in ue5-main branch]
2023-04-13 20:30:11 -04:00

39 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "ModelViewViewModelBlueprintModule.h"
#include "Modules/ModuleManager.h"
#include "ViewModel/MVVMViewModelBlueprint.h"
#include "ViewModel/MVVMViewModelBlueprintCompiler.h"
class FModelViewViewModelBlueprintModule : public IModuleInterface
{
public:
virtual void StartupModule() override
{
#if UE_MVVM_WITH_VIEWMODEL_EDITOR
IKismetCompilerInterface& KismetCompilerModule = FModuleManager::GetModuleChecked<IKismetCompilerInterface>("KismetCompiler");
KismetCompilerModule.GetCompilers().Add(&ViewModelBlueprintCompiler);
FKismetCompilerContext::RegisterCompilerForBP(UMVVMViewModelBlueprint::StaticClass(), &UMVVMViewModelBlueprint::GetCompilerForViewModelBlueprint);
#endif
}
virtual void ShutdownModule() override
{
#if UE_MVVM_WITH_VIEWMODEL_EDITOR
if (IKismetCompilerInterface* KismetCompilerModule = FModuleManager::GetModulePtr<IKismetCompilerInterface>("KismetCompiler"))
{
KismetCompilerModule->GetCompilers().Remove(&ViewModelBlueprintCompiler);
}
#endif
}
private:
UE::MVVM::FViewModelBlueprintCompiler ViewModelBlueprintCompiler;
};
IMPLEMENT_MODULE(FModelViewViewModelBlueprintModule, ModelViewViewModelBlueprint);