Hi, I don’t know why my code run in the editor but when I package game for the Android platform, I encounter an error and program close automatically.
Actually, I want to use my blueprint Player Controller and Character instead of the static class of it so I tried to address BP but failed(in Android).
Anyone can help me to solve it.
Thanks in advance.
MobileGameModeBase::MobileGameModeBase()
{
UClass* PlayerControllerBPClass = LoadObject< UClass >(nullptr, TEXT("/Game/Blueprint/MainPlayer/MyPlayerControllerBP.MyPlayerControllerBP_C"));
if (PlayerControllerBPClass)
PlayerControllerClass = PlayerControllerBPClass;
UClass* CharacterBPClass = LoadObject< UClass >(nullptr, TEXT("/Game/Blueprint/MainPlayer/MainCharacterBP.MainCharacterBP_C"));
if (CharacterBPClass)
DefaultPawnClass = CharacterBPClass;
}