三国卡牌客户端基础资源仓库
yyl
2025-05-26 91736aa8b64c1c5a7c6dd442bdfd3632dfa57ca2
18 子 2D卡牌客户端搭建 / 2D卡牌客户端搭建
1个文件已修改
71 ■■■■■ 已修改文件
Assets/Launch/Common/ResourcesPath.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Common/ResourcesPath.cs
@@ -80,75 +80,4 @@
        Debug.Log("External Path: " + ExternalStorePath);
    }
    public void CleanCache()
    {
        // ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
        // Language.Get("CleanCache2"), (bool isOk) =>
        // {
        //     if (isOk)
        //     {
        //         try
        //         {
        //             // 获取persistentDataPath下的所有文件和文件夹
        //             string[] files = Directory.GetFiles(ExternalStorePath);
        //             string[] dirs = Directory.GetDirectories(ExternalStorePath);
        //             // 删除所有文件
        //             foreach (string file in files)
        //             {
        //                 if (file.Contains("config"))
        //                 {
        //                     continue;
        //                 }
        //                 File.Delete(file);
        //             }
        //             // 递归删除所有文件夹
        //             foreach (string dir in dirs)
        //             {
        //                 if (dir.Contains("config"))
        //                 {
        //                     continue;
        //                 }
        //                 Directory.Delete(dir, true);
        //             }
        //             files = Directory.GetFiles(ExternalStorePath + "/config");
        //             foreach (string file in files)
        //             {
        //                 bool isDelete = true;
        //                 foreach (string filename in ConfigInitiator.builtinConfig)
        //                 {
        //                     if (file.Contains(filename))
        //                     {
        //                         isDelete = false;
        //                         break;
        //                     }
        //                 }
        //                 if (isDelete)
        //                     File.Delete(file);
        //             }
        //         }
        //         catch (System.Exception e)
        //         {
        //             Debug.LogError("Failed to clean persistent data: " + e.Message);
        //         }
        //         finally
        //         {
        //             Clock.AlarmAfter(0.1f, () =>
        //             {
        //                 Application.Quit();
        //             });
        //             Debug.Log("Persistent data cleaned.");
        //         }
        //     }
        // });
    }
}