Files
ProjectEleri/Source/ProjectEleriEditor/Private/ProjectEleriEditorModule.cpp
2026-07-11 10:43:52 +02:00

23 lines
897 B
C++

#include "ProjectEleriEditorModule.h"
#include "Modules/ModuleManager.h"
#include "PropertyEditorModule.h"
#include "ItemDataAssetCustomization.h"
IMPLEMENT_GAME_MODULE(FProjectEleriEditorModule, ProjectEleriEditor);
void FProjectEleriEditorModule::StartupModule()
{
FPropertyEditorModule& PropEd = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropEd.RegisterCustomClassLayout(
TEXT("ItemDataAsset"), // UCLASS name
FOnGetDetailCustomizationInstance::CreateStatic(&FItemDataAssetCustomization::MakeInstance)
);
}
void FProjectEleriEditorModule::ShutdownModule()
{
if (FModuleManager::Get().IsModuleLoaded("PropertyEditor")) {
FPropertyEditorModule& PropEd = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropEd.UnregisterCustomClassLayout(TEXT("ItemDataAsset"));
}
}