How to spawn actors in design stage?

Hi all. So to set the scene, I have a number of .obj models and also files describing where those models should be placed (4x4 matrices, some models are placed multiple times, …). I also have no experience with c++ (only similar languages) or with unreal engine.

How do I go about automizing the placement of those models in a scene at the design stage, so that I can still move em further around?

I found this tutorial : https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/SpawnAndDestroyActors/Blueprints/
and I think this simply doesn’t work anymore in ue 4.16.

I also found this How to spawn actor in C++? Been trying for 9 hours now - C++ - Unreal Engine Forums . Now to call GetWorld(), I’d have to extend something like an actor, so that it can be placed in the world, and getworld can be called. but how can I run that code on my actor at design time?

Also, the question states that I have to “#include the thing I want to spawn”. Does this mean that I have to include some kind of genericasset.h header, and pass the name of my model in the FActorSpawnParameters? Or do I have to ‘include a model’, if such a thing makes sense?

Theres this nice visual interface-programming, how are you supposed to combine it with some c++ scripts? I created a class that defined some functions, but have no clue how I could instantiate said class in the blueprint and call some functions on it.

And how would I preferably go about reading in the positions of all models, should I try to create some kind of csv formatted datatable?

Any help whatsoever would be greatly appreciated.

Small update. I managed to create a c++ class, create a blutility that calls a function in my class, and that function can potentially spawn meshes. The problem is that SpawnActor requires that I pass in the class of the object that I want to spawn, but they’re simple objects, they have no class. I really don’t want to have to wrap every object in a class…

Alright, figured it out.

The trick is to create a c++ plugin. You can then spawn static meshes by executing :

UWorld* const World = GEditor->GetEditorWorldContext().World();
	AStaticMeshActor* newmesh = Cast<AStaticMeshActor>(GEditor->AddActor(World->GetCurrentLevel(), AStaticMeshActor::StaticClass(), FTransform(FVector(0))));
	newmesh->GetStaticMeshComponent()->SetStaticMesh(LoadObject < UStaticMesh>(nullptr, TEXT("StaticMesh'/Game/StarterContent/Props/SM_Chair.SM_Chair'")));
	newmesh->MarkComponentsRenderStateDirty();

I can now create a csv file containing the paths of my objects along with their mat4s, read it in somehow and use the Ftransform to apply the mat4s. Quite neat, all in all.