Add Custom classes to Editor Quick Pick "Place Mode" (Actor Factory?)

I find a way to add your custom actor to existing category:

  1. At first you need Editor module, reimplement UUnrealEdEngine::Init() method and add your actor factory in desired category (as LNaej sad try RegisterPlacementCategory() to create a new one instead).


Super::Init ( InEngineLoop );
IPlacementModeModule& PlacementModule = IPlacementModeModule::Get();
    PlacementModule.RegisterPlaceableItem(
        FBuiltInPlacementCategories::Lights(),
        MakeShareable(new FPlaceableItem(*UActorFactoryMyActor::StaticClass(), 60))
    );

UActorFactoryMyActor class is simple:



UCLASS(config=Editor)
class MYEDITOR_API UActorFactoryMyActor : public UActorFactory
{
    GENERATED_UCLASS_BODY()

};


#include "Internationalization.h"

#define LOCTEXT_NAMESPACE "ActorFactory"

UActorFactoryMyActor::UActorFactoryMyActor(const FObjectInitializer& ObjectInitializer)
    : Super(ObjectInitializer)
{
    DisplayName = LOCTEXT("MyActorDisplayName", "My Awesome Actor");
    NewActorClass = AMyActor::StaticClass();
    SpawnPositionOffset = FVector(50, 0, 0);
    bUseSurfaceOrientation = true;
}