Load BluePrint from GameMode C++

I have this C++ GameMode header (it’s from one of the starter C++ templates):

#pragma once
#include "GameFramework/GameMode.h"
#include "TestProject123GameMode.generated.h"

UCLASS(minimalapi)
class ATestProjectGameMode : public AGameMode
{
	GENERATED_BODY()

public:
	ATestProjectGameMode ();

	virtual void BeginPlay() override; //I added this
};

And its cpp:

#include "TestProject.h"
#include "TestProjectGameMode.h"
#include "TestProjectPlayerController.h"
#include "TestProjectCharacter.h"
#include "MapContainer.h"
#include "EngineUtils.h"

ATestProjectGameMode::ATestProjectGameMode()
{
	// use our custom PlayerController class
	PlayerControllerClass = ATestProjectPlayerController::StaticClass();

	// set default pawn class to our Blueprinted character
	static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/TopDownCPP/Blueprints/TopDownCharacter"));
	if (PlayerPawnBPClass.Class != NULL)
	{
		DefaultPawnClass = PlayerPawnBPClass.Class;
	}
}

void ATestProjectGameMode::BeginPlay() //Added this to load my AMapContainer class, and it works. The problems are with BluePrints !
{
	UWorld * const World = GetWorld();
	if (World)
	{
		World->SpawnActor<AMapContainer>(AMapContainer::StaticClass());
    }
}

I then made this door BluePrint:

79841-screenshot_59.png

What I want to know is what’s the PROPER way of making my GameMode C++ spawn this Blueprint when I hit play.

From what I understood researching all similar questions (and I’ve read them all), things changed in the latest versions. It’s all very confusing or outdated. Hope someone is able to shine some light into this.

Someone posted a correct answer on the forum at this link.

For Unreal 4.15, you will have to do it like this:

static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Path/To/Your/Blueprint_Class"));
if(PlayerPawnBPClass.Succeeded()) DefaultPawnClass = PlayerPawnBPClass.Class;