[HOWTO] Reset Progress With Corgi Engine
Posted: Sat Feb 19, 2022 8:27 am
More Mountains' Corgi Platformer Engine has a menu item Tools > More Mountains > Reset all progress.
If you're using any of the Dialogue System's ***EventListener components to tie the Dialogue System into Corgi's save system, you can make a parallel menu item to clear Corgi's data and the Dialogue System data stored in Corgi's save system.
Place this script in a folder named "Editor":
DialogueSystemProgressManagerMenu.cs
It will add a menu item "Reset all progress (plus DS)".
To be able to reset everything at runtime in your game, locate the progress manager script in your scene, if present:
Replace the RetroAdventureProgressManager script with a subclass script like this:
MyGameProgressManager.cs
A similar process applies to More Mountains' TopDown Engine, which uses essentially the same save system.
If you're using any of the Dialogue System's ***EventListener components to tie the Dialogue System into Corgi's save system, you can make a parallel menu item to clear Corgi's data and the Dialogue System data stored in Corgi's save system.
Place this script in a folder named "Editor":
DialogueSystemProgressManagerMenu.cs
Code: Select all
using MoreMountains.Tools;
using UnityEditor;
namespace MoreMountains.CorgiEngine
{
public static class DialogueSystemProgressManagerMenu
{
[MenuItem("Tools/More Mountains/Reset all progress (plus DS)", false, 21)]
private static void ResetProgress()
{
RetroAdventureProgressManager.Instance.ResetProgress();
MMSaveLoadManager.DeleteSaveFolder("DialogueSystem");
}
}
}
To be able to reset everything at runtime in your game, locate the progress manager script in your scene, if present:
Replace the RetroAdventureProgressManager script with a subclass script like this:
MyGameProgressManager.cs
Code: Select all
using UnityEngine;
using MoreMountains.Tools;
public class MyGameProgressManager : RetroAdventureProgressManager
{
public override void ResetProgress()
{
base.ResetProgress();
MMSaveLoadManager.DeleteSaveFolder ("DialogueSystem");
}
}