Download

How to create a DetailBuilder to show properties in a plugin tab?

I’m trying to display properties of my class in a plugin tab, not in the detail window.

In the docs, https://docs.unrealengine.com/en-US/Programming/Slate/DetailsCustomization/index.html

How to create a DetailBuilder?

There is only a single **IDetailCategoryBuilder **implementation called **FDetailCategoryImpl **in *UnrealEngine\Engine\Source\Editor\PropertyEditor\Private\DetailCategoryBuilderImpl.h. *I don’t think I can use it.

Just found out:



class MyDetailCustomization : IDetailCustomization
{
public:
    void CustomizeDetails( IDetailLayoutBuilder& DetailBuilder) override
    {
        //use DetailBuilder
    }
};

TSharedRef<class IDetailCustomization> OnGetDetailCustomization()
{
    return MakeShared<MyDetailCustomization>();
}

//...
DetailsPanel->SetGenericLayoutDetailsDelegate(FOnGetDetailCustomizationInstance::CreateStatic(&OnGetDetailCustomization));


I never noticed SetGenericLayoutDetailsDelegate before.

But this seems to be *appending *UI widgets to the original DetailsView, not replacing. I want to replace the original UI and create UI myself. I have noticed **RegisterInstancedCustomPropertyLayout **but it just did nothing: call it or not will have no effect on the UI.

Property handles, for no obvious good reason, seem to be tied to detail customizations.

You can create detail views anywhere though, with variants for objects, structs and single properties.
The standard one is tied to one or more objects, and as you say, the generic layout delegate will append its customization to UI generated for the objects. There’s nothing stopping you from setting the object to nullptr though, in which case you’ll just get whatever you add in the generic delegate.

The instanced layout is for customizing specific object types - like normal detail customizations, but applied only to a specific details view widget.