The way I have done this is with a DetailsView
widget.
In the object you are editing, add a
UPROPERTY(EditAnywhere)
FNameSelector CustomProperty;
which will be the custom property exposed in the editor details view. Then define FNameSelector
and add a custom property for it.
Make a struct to hold the name value:
USTRUCT()
struct FNameSelector
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
FName Name;
FAssetCategoryNameSelector()
{}
FAssetCategoryNameSelector(const FName& InName) :
Name(InName)
{}
};
Make a class with the IPropertyTypeCustomization
interface, and put your string data in it somehow,
class FSomeClass: public IPropertyTypeCustomization
In the PropertySelectionChanged
callback, set CustomProperty.Name
of your object.
In your module, add a custom property type for your object and the selector class that you just made.
Module.RegisterCustomPropertyTypeLayout("NameSelector", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FSomeClass::MakeInstance));