Instantiate a prefab at a certain position

The equivalent of prefabs are blueprints. I’m assuming you have a blueprint that is responsible for the spawn which is based on a c++ class. Inside the header file of your c++ class, add the following property:

UPROPERTY(EditAnywhere)
TSubclassOf<AYourActor> YourActorBP; // where AYourActor is the parent c++ class of the blueprint

Then, don’t forget to compile and switch to your editor and “link” the YourActorBP with the blueprint you want.

After that, somewhere in your logic (.cpp file) type in:

//Create a Spawn Parameters struct
FActorSpawnParameters SpawnParams;
//Spawning Actor...
AYourActor* AYourActor = GetWorld()->SpawnActor<AYourActor>(YourActorBP, GetTransform(), SpawnParams);

Spawn Parameters provide some useful functionality when spawning. Of course, you can create a transform you want and replace the second property I’ve provided above. There are some other overloads for the SpawnActor function, all of them can be found here

-Orfeas