fix: multiple issuse

This commit is contained in:
2025-10-12 14:44:12 +02:00
parent 6be3bf9fa2
commit 3bc3e697d2
2 changed files with 19 additions and 5 deletions

View File

@@ -12,18 +12,32 @@ AUTAD_UIGameMode::AUTAD_UIGameMode()
// set default pawn class to our Blueprinted character
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(
TEXT("/Game/Blueprints/BP_TopDownCharacter"));
if (PlayerPawnBPClass.Class != nullptr)
TEXT("/Game/Blueprints/BP_MainCharacter"));
if (PlayerPawnBPClass.Class)
{
DefaultPawnClass = PlayerPawnBPClass.Class;
}
else
{
UE_LOG(
LogTemp, Error,
TEXT(
"AUTAD_UIGameMode::AUTAD_UIGameMode(): Failed to find BP_MainCharacter. Please ensure it exists"));
}
// set default controller to our Blueprinted controller
static ConstructorHelpers::FClassFinder<APlayerController>
PlayerControllerBPClass(
TEXT("/Game/Blueprints/BP_TopDownPlayerController"));
if (PlayerControllerBPClass.Class != NULL)
TEXT("/Game/Blueprints/BP_MainPlayerController"));
if (PlayerControllerBPClass.Class)
{
PlayerControllerClass = PlayerControllerBPClass.Class;
}
else
{
UE_LOG(
LogTemp, Error,
TEXT(
"AUTAD_UIGameMode::AUTAD_UIGameMode(): Failed to find BP_MainPlayerController. Please ensure it exists"));
}
}