Reset all variables
Reset all variables
Hello, I have a bunch of variables and quests set in my dialogue database and now I want to reset these variables to their default values when the player presses "reset", what should I do?
Re: Reset all variables
Hi,
Use this line of C#:
Or, if you're using the Save System:
which automatically calls DialogueManager.ResetDatabase() (assuming your Dialogue Manager has a DialogueSystemSaver component).
If you don't want to write any code, you can add a SaveSystemMethods component to a UI Button and configure its OnClick() event call SaveSystemMethods.ResetGameGame.
Use this line of C#:
Code: Select all
PixelCrushers.DialogueSystem.DialogueManager.ResetDatabase();
Code: Select all
PixelCrushers.SaveSystem.ResetGameState();
If you don't want to write any code, you can add a SaveSystemMethods component to a UI Button and configure its OnClick() event call SaveSystemMethods.ResetGameGame.