This commit is contained in:
Oleg Petruny 2024-07-21 19:02:39 +02:00
parent 346f2b22ef
commit 4037fe3f1a
2 changed files with 4 additions and 0 deletions

View File

@ -113,8 +113,12 @@ void UCustomGameInstanceBase::SaveGame(FName checkpointName)
saveData->checkpoint = checkpointName;
if(player->leftPocketItem)
saveData->playerLeftPocketItem = player->leftPocketItem->GetFName();
else
saveData->playerLeftPocketItem = FName(TEXT(""));
if(player->rightPocketItem)
saveData->playerRightPocketItem = player->rightPocketItem->GetFName();
else
saveData->playerRightPocketItem = FName(TEXT(""));
UGameplayStatics::SaveGameToSlot(saveData, TEXT("Save"), 0);
}