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

I’ve been looking around for a little while now for the ability to add my own custom classes onto the left hand “Place” section under the modes tab

88d0b31fc44aaeeea80944e2c4ee05b597c178d4.jpeg

In UDK you could add ActorFactories that would allow you to place classes in the Right-Click menu, and I know in UE4 you can modify an ini file to add custom Blueprint parent classes for quick selection, so I imagine there is a way you can do this!

Thanks for any information you have.

Just bumping this instead of asking it all over again.

Haven’t really been successful getting anything to appear in here. Found some ActorFactory classes, but they didn’t appear to do anything for me.

Just had a look through the engine source and everything about this section of the UI is hard coded - both the placement categories, and the lists of classes in the categories. It doesn’t look like it’s extensible or customizable at all.

This is not in keeping with how the editor is done as a whole, so it might be worth suggesting it as a feature request. Still, for now I think you’re out of luck, short of modding the engine.

I’m sure there’s a UPROPERTY or UCLASS macro specifier for this… could be wrong.

I’d rather not modify the engine for something so trivial. Especially since all that is needed to add a “Blueprint Parent Selection” to the “quick-pick” list is just an .ini edit.

I’ll check into some of the macros, but I don’t remember seeing any of the classes that appear having any, or even anything in the macro’s documentations.

Bump! I need to do this as well :slight_smile:

It seems that you need to go through the IPlacementModeModule interface and its RegisterPlacementCategory() method. You can take a look at PlacementModeModule.cpp::StartupModule() method to see how the method is used.

All of my blueprints automatically appear under the “All Classes” section, so it’s possible you only need to do a minor change for them to show up in the other categories.

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;
}


…And how do you draw the rest of the owl?

Where do you reimplement UUnrealEdEngine::Init()?

I put it in startup module instead because that made sense but it simply doesn’t show up. Oh well.

Bump. I need this too.

Bumping this.

I wish they would allow you to add custom categories and actors in the “Place Actors” tab. (Be it BP or C++.) It would really improve workflow.

Sorry I forgot to mention important settings:

  1. Create Editor Module;
  2. In this module inherit UUnrealEdEngine class;
  3. Reimplement Init() method (see my first post for body)
  4. In DefaultEngine.ini configuration file in section
    [/Script/Engine.Engine]
    add
    UnrealEdEngine=/Script/.

use FPlacementCategoryInfo and IPlacementModeModule::Get().RegisterPlaceableItem()

1 Like