using System.IO;
using DialogueSystem;
using UnityEngine;

namespace Managers
{
    public class ResetGameSafe : MonoBehaviour
    {
        public void ResetGameSafeData()
        {
            var dir = Application.persistentDataPath; 

            var archivePath    = Path.Combine(dir, "archive.json");    
            var globalDataPath = Path.Combine(dir, "globaldata.json"); 

            if (File.Exists(archivePath)) File.Delete(archivePath);
            if (File.Exists(globalDataPath)) File.Delete(globalDataPath);
            
            FindFirstObjectByType<GenericScriptableObjectArchive>().SetReset();
            
        }
    }
}
