[HOWTO] Reset Progress With Corgi Engine

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 20703
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] Reset Progress With Corgi Engine

Post by Tony Li »

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

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");
        }
    }
}
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:

corgiProgressManager.png
corgiProgressManager.png (37.86 KiB) Viewed 4441 times

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");
    }
}
A similar process applies to More Mountains' TopDown Engine, which uses essentially the same save system.
Post Reply