Clear Conversation Prefs

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
OneManOnMars
Posts: 105
Joined: Tue Apr 05, 2016 9:37 am

Clear Conversation Prefs

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

Re: Clear Conversation Prefs

Post 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.
Post Reply