//Add this code to your Actor or whatever class constructor.
#define LOCTEXT_NAMESPACE "Custom Detail"
static const FName PropertyEditor("PropertyEditor");
FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>(PropertyEditor);
//Change "Actor" for the type of your Class(eg. Actor, Pawn, CharacterMovementComponent)
//Change "MySection" to the name of Desired Section
TSharedRef<FPropertySection> Section = PropertyModule.FindOrCreateSection("Actor", "MySection", LOCTEXT("MySection", "MySection"));
//You can add multiples categories to be tracked by this section


// Now declare your variable normally, but use the Category with exactly what you defined on
// the track (Section->AddCategory("MyCategory");)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyCategory")
int32 MyVariable;