How to customize the details panel of a pure blueprint class

Hi,

It seems that to customize the details panel of a C++ UCLASS, you must create a class that derives from IDetailCustomization and register it with the PropertyEditorModule like so:

FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked< FPropertyEditorModule >(TEXT("PropertyEditor"));
PropertyModule.RegisterCustomClassLayout(TEXT("Foo"), FOnGetDetailCustomizationInstance::CreateStatic(&MyClassThatDerivesFromDetailCustomization::MakeInstance));

This seems to work only if ‘Foo’ is the name of a C++ class though. If I create a pure blueprint class deriving from AActor, the detail customization never gets used and no errors are shown.

Is there any way of customizing the details panel of a class that doesn’t derive from a custom C++ class?

I suggest you not use a static class name.
Try use TargetClass::StaticClass()->GetFName() or TargetInstance->GetClass()->GetFName() to get the Class Name.
It should also work for blueprint class. You can get UClass for the blueprint class by using UClass* BlueprintUClass= LoadClass<UClass>("Blueprint '/Game/Blueprint.Blueprint_C'");. then use BlueprintUClass->GetFName() to get class name for the blueprint class. After that, you should be able to register the custom class layout for the blueprint class.