Hi, I would like to reset all variables to their initial value when my scene is loaded. Is there a simple way to do so?
Thanks!
Reset All Variables To Initial Value
Re: Reset All Variables To Initial Value
Hi,
Yes, call DialogueManager.ResetDatabase or use the equivalent visual scripting action in PlayMaker, Bolt, etc.
For example, if you put this script on a GameObject in your scene, it will reset the database:
ResetDatabaseOnStart.cs
Yes, call DialogueManager.ResetDatabase or use the equivalent visual scripting action in PlayMaker, Bolt, etc.
For example, if you put this script on a GameObject in your scene, it will reset the database:
ResetDatabaseOnStart.cs
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
public ResetDatabaseOnStart : MonoBehaviour
{
void Start()
{
DialogueManager.ResetDatabase(DatabaseResetOptions.KeepAllLoaded);
}
}
-
- Posts: 4
- Joined: Sun Jan 20, 2019 7:06 pm
Re: Reset All Variables To Initial Value
Hi Tony, thanks for the reply! I'll try to implement your suggestion!
=)
=)