Save System Doubt

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Kamotachi
Posts: 44
Joined: Fri Nov 29, 2019 9:03 pm

Save System Doubt

Post 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: )
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save System Doubt

Post 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).
Kamotachi
Posts: 44
Joined: Fri Nov 29, 2019 9:03 pm

Re: Save System Doubt

Post 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!
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save System Doubt

Post by Tony Li »

Happy to help!
Post Reply