By default, UObject-
derived UAssets open in the generic property editor. It looks like the following screenshot:
However, at times you may wish for custom widgets to allow editing of properties on your class. To facilitate this, Unreal supports Details Customization, which is the focus of this recipe.
Create a new header file called
MyCustomAssetDetailsCustomization.h
.Add the following includes to the header:
#include "MyCustomAsset.h" #include "DetailLayoutBuilder.h" #include "IDetailCustomization.h" #include "IPropertyTypeCustomization.h"
Define our customization class as follows:
class FMyCustomAssetDetailsCustomization : public IDetailCustomization { public: virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override; void ColorPicked(FLinearColor SelectedColor); static TSharedRef<IDetailCustomization> FMyCustomAssetDetailsCustomization::MakeInstance() { return MakeShareable(new FMyCustomAssetDetailsCustomization...