Reorder variable Categories in Class Defaults

You can make a customization of this class’s details panel. Here’s the example.



class FYOURCLASSDetailsCustomization : public IDetailCustomization
{
public:
    static TSharedRef<IDetailCustomization> MakeInstance();

    virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;
};

TSharedRef<IDetailCustomization> FYOURCLASSDetailsCustomization::MakeInstance()
{
    return MakeShareable(new FYOURCLASSDetailsCustomization);
}

void FYOURCLASSDetailsCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder)
{
    IDetailCategoryBuilder& YourCategory = DetailBuilder.EditCategory("Base Category", FText::GetEmpty(), ECategoryPriority::Important);
}


It works well for normal categories but I’m not sure whether it also works well for sub categories.
And apart from it, it only has 6 types of priority.



namespace ECategoryPriority
{
    enum Type
    {

        // Highest sort priority
        Variable = 0,
        Transform,
        Important,
        TypeSpecific,
        Default,
        // Lowest sort priority
        Uncommon,
    };
}