Files
utad-ui/Source/UTAD_UI/UTAD_UIGameMode.cpp

30 lines
913 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "UTAD_UIGameMode.h"
#include "UTAD_UIPlayerController.h"
#include "UTAD_UICharacter.h"
#include "UObject/ConstructorHelpers.h"
AUTAD_UIGameMode::AUTAD_UIGameMode()
{
// use our custom PlayerController class
PlayerControllerClass = AUTAD_UIPlayerController::StaticClass();
// set default pawn class to our Blueprinted character
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(
TEXT("/Game/Blueprints/BP_TopDownCharacter"));
if (PlayerPawnBPClass.Class != nullptr)
{
DefaultPawnClass = PlayerPawnBPClass.Class;
}
// set default controller to our Blueprinted controller
static ConstructorHelpers::FClassFinder<APlayerController>
PlayerControllerBPClass(
TEXT("/Game/Blueprints/BP_TopDownPlayerController"));
if (PlayerControllerBPClass.Class != NULL)
{
PlayerControllerClass = PlayerControllerBPClass.Class;
}
}