26 lines
1.1 KiB
C++
26 lines
1.1 KiB
C++
#include "PawnEditorModule.h"
|
|
|
|
#include "PwnStyle.h"
|
|
#include "Customization/PwnInteractableActorCustomization.h"
|
|
#include "Interaction/PwnInteractableActor.h"
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
IMPLEMENT_MODULE(FPawnEditorModule, PawnEditor)
|
|
|
|
void FPawnEditorModule::StartupModule() {
|
|
FPwnStyle::Initialize();
|
|
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
|
|
PropertyModule.RegisterCustomPropertyTypeLayout(FPwnInteractableActor::StaticStruct()->GetFName(),
|
|
FOnGetPropertyTypeCustomizationInstance::CreateStatic(
|
|
&UPwnInteractableActorCustomization::MakeInstance));
|
|
PropertyModule.NotifyCustomizationModuleChanged();
|
|
}
|
|
|
|
void FPawnEditorModule::ShutdownModule() {
|
|
FPwnStyle::Shutdown();
|
|
if (FModuleManager::Get().IsModuleLoaded("PropertyEditor")) {
|
|
FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
|
|
PropertyModule.UnregisterCustomPropertyTypeLayout(FPwnInteractableActor::StaticStruct()->GetFName());
|
|
PropertyModule.NotifyCustomizationModuleChanged();
|
|
}
|
|
} |