feat: 修改存档和结果路径

This commit is contained in:
2026-07-28 01:11:46 +08:00
parent 80e965b274
commit 2902c554a6
2 changed files with 10 additions and 10 deletions
+4 -7
View File
@@ -13,9 +13,6 @@ namespace AibisDream
/// </summary>
public class SettingLoader
{
private static readonly string SettingPath = Path.Combine(Application.persistentDataPath, "AllOurBrokenParts", "Config", "setting.json");
private static readonly string SettingDefaultPath = Path.Combine(Application.streamingAssetsPath, "Config", "setting.json");
private readonly ConfigContainer _container;
private SettingLoader()
@@ -25,7 +22,7 @@ namespace AibisDream
// 初始化设置文件(如果不存在)
InitSettingFile();
// 读取数据
_container = new ConfigContainer(SettingPath);
_container = new ConfigContainer(ConstRef.SettingPath);
LoadAllSetting();
// 注册回调函数
_container.OnWrite += OnSettingChanged;
@@ -39,14 +36,14 @@ namespace AibisDream
private void InitSettingFile()
{
// 如果文件存在,则直接返回
if (File.Exists(SettingPath))
if (File.Exists(ConstRef.SettingPath))
{
return;
}
// 如果文件不存在,则复制默认设置(Language 为空表示跟随系统语言)
var defaultSetting = JsonUtil.ReadJObject(SettingDefaultPath);
JsonUtil.SaveJObject(defaultSetting, SettingPath);
var defaultSetting = JsonUtil.ReadJObject(ConstRef.SettingDefaultPath);
JsonUtil.SaveJObject(defaultSetting, ConstRef.SettingPath);
}
private void LoadAllSetting()