Page 1 of 1

Save System Doubt

Posted: Fri Nov 05, 2021 12:25 pm
by Kamotachi
Hi!

I'm having some issues when I want to erase the game data.
In my game, when I press the "New Game" button, it erase the game data with PlayerPrefs.DeleteAll ();
However, when you start the game, all the variables and quests are still loaded from the previous game data.

Something curious is that when closing the game and opening it again, everything is finally erased.

I don't know if it's an error of mine with my code or if it may have something to do with the dialog system.
Should I delete the game data using something other than PlayerPrefs.DeleteAll ()?

My DialogueSystem contains:
Image


Maybe I need to call the button "Clear Saved Games" from PlayerPrefs "Saved Game Data Storer" ?

( I'm sorry to ask here because maybe it's due to my ineptitude and not to anything related to the dialogue system, but I can't find the fault ! :oops: )

Re: Save System Doubt

Posted: Fri Nov 05, 2021 1:31 pm
by Tony Li
Hi,

To erase the game data in memory, call PixelCrushers.SaveSystem.ResetGameGame(), or SaveSystem.RestartGame("scene") to reset the game data and load the first gameplay scene.

To delete the saved game (files/PlayerPrefs), use SaveSystem.storer.DeleteSavedGameData(slotNumber).

Re: Save System Doubt

Posted: Fri Nov 05, 2021 10:57 pm
by Kamotachi
Tony Li wrote: Fri Nov 05, 2021 1:31 pm Hi,

To erase the game data in memory, call PixelCrushers.SaveSystem.ResetGameGame(), or SaveSystem.RestartGame("scene") to reset the game data and load the first gameplay scene.

To delete the saved game (files/PlayerPrefs), use SaveSystem.storer.DeleteSavedGameData(slotNumber).
:mrgreen: Solved! Thanks again, you are my hero!

Re: Save System Doubt

Posted: Sat Nov 06, 2021 8:49 am
by Tony Li
Happy to help!