NakatomiGameInstance Save updates

This commit is contained in:
baz 2024-05-27 20:33:24 +01:00
parent 3ea7bc2dc4
commit ee9718e9e3
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ UNakatomiSaveGame* UNakatomiGameInstance::CreateNewSaveGame(FString PlayerName)
if (UNakatomiSaveGame* Save = Cast<UNakatomiSaveGame>(
UGameplayStatics::CreateSaveGameObject(UNakatomiSaveGame::StaticClass())))
{
SaveGameObject->PlayerName = PlayerName;
Save->PlayerName = PlayerName;
if (UGameplayStatics::SaveGameToSlot(Save, PlayerName, 0))
{

View File

@ -45,7 +45,7 @@ public:
UNakatomiSaveGame* LoadGameFromSlot(FString SaveSlotName);
UFUNCTION(BlueprintCallable)
bool SaveGame(bool ResetDefaults);
bool SaveGame(bool ResetDefaults = false);
UFUNCTION(BlueprintCallable)
UNakatomiSaveGame* GetSaveGameObject();