Page 1 of 1

Clear Conversation Prefs

Posted: Sat Oct 28, 2017 5:51 pm
by OneManOnMars
Hi,

What do I have to do to delete all save date with a button press?
I have a button in a scene which should reset the game. Right now it clears PlayerPrefs.

PlayerPrefs.DeleteAll ();

But this seems not to include the conversations.

So how do I delete these?

Many thanks,

Re: Clear Conversation Prefs

Posted: Sat Oct 28, 2017 8:14 pm
by Tony Li
Hi,

To reset the Dialogue System's environment to its starting state (i.e., as originally defined in your dialogue database), call DialogueManager.ResetDatabase.

To reset the Dialogue System to contain only the initial database:

Code: Select all

using PixelCrushers.DialogueSystem;
...
DialogueManager.ResetDatabase(DatabaseResetOptions.RevertToDefault);
To keep any extra databases you've loaded but simply reset to their starting values:

Code: Select all

DialogueManager.ResetDatabase(DatabaseResetOptions.KeepAllLoaded);
If you're only using one dialogue database, there's no difference between the two.