작성
·
508
·
수정됨
0
// Fill out your copyright notice in the Description page of Project Settings.
#include "Game/ABGameMode.h"
#include "ABGameMode.h"
//#include "Player/ABPlayerController.h"
AABGameMode::AABGameMode()
{
UE_LOG(LogTemp, Warning, TEXT("inflearn1"));
static ConstructorHelpers::FClassFinder<APawn> ThirdPersonClassRef(TEXT("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter.BP_ThirdPersonCharacter_C"));
if (ThirdPersonClassRef.Class)
{
DefaultPawnClass = ThirdPersonClassRef.Class;
}
static ConstructorHelpers::FClassFinder<APlayerController> PlayerControllerClassRef(TEXT("/Script/ArenaBattle.ABPlayerController"));
if (PlayerControllerClassRef.Class != nullptr)
{
UE_LOG(LogTemp, Warning, TEXT("PlayerControllerClassRef.Class found: %s"), *PlayerControllerClassRef.Class->GetName());
PlayerControllerClass = PlayerControllerClassRef.Class;
}
else
{
UE_LOG(LogTemp, Error, TEXT("PlayerControllerClassRef.Class not found."));
}
//PlayerControllerClass = AABPlayerController::StaticClass();
}
위 코드를 입력했을 때 실행 결과는 아래와 같습니다.
제가 경로를 잘못 넣었다기에는 수업자료를 그대로 복붙도 해보았으며
/Script/CoreUObject.Class'/Script/ArenaBattle.ABPlayerController'
위 경로 또한 5초전에 레퍼런스를 복사해 온 경로입니다