Hey, guys. I am trying to make a saved game by using UGameplayStatics::SaveGameToSlot. It works all fine from the begining until some day, I delete the saved file, and try to test the save game function again, it crashed on UGameplayStatics::SaveGameToSlot. I made a small test program like the following code, and make them execute at once when I hit play.
FPlayerProfile playerProfileSave;
playerProfileSave.mPlayerName = FText::FromString(TEXT("haha"));
USaveGame_TheLastBastion* mSaveGame = nullptr;
if (mSaveGame == nullptr)
mSaveGame = Cast<USaveGame_TheLastBastion>(UGameplayStatics::CreateSaveGameObject(USaveGame_TheLastBastion::StaticClass()));
if (mSaveGame)
{
mSaveGame->SetPlayerProfile(playerProfileSave);
UGameplayStatics::SaveGameToSlot(mSaveGame, TEXT("Save"), 0);
}
It still crashes. By using the debug symbol, it leads to this. Anyone know whats happened?