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
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
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:
- 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();
MakeShareable(new FPlaceableItem(*UActorFactoryMyActor::StaticClass(), 60))
UActorFactoryMyActor class is simple:
class MYEDITOR_API UActorFactoryMyActor : public UActorFactory
#define LOCTEXT_NAMESPACE "ActorFactory"
UActorFactoryMyActor::UActorFactoryMyActor(const FObjectInitializer& 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.
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:
- Create Editor Module;
- In this module inherit UUnrealEdEngine class;
- Reimplement Init() method (see my first post for body)
- In DefaultEngine.ini configuration file in section
use FPlacementCategoryInfo and IPlacementModeModule::Get().RegisterPlaceableItem()