This commit is contained in:
2026-06-12 16:41:22 +08:00
parent 2dcb0c1c3a
commit 0c1fa609c0
2 changed files with 6 additions and 2 deletions
@@ -148,12 +148,16 @@ namespace SGModule.ConfigLoader
}
else
{
Debug.Log(savedCfgName);
FirstLaunchCopyConfig(success =>
{
savedCfgName = SavedConfigFileName;
path = Path.Combine(FileNetworkManager.Instance.GetConfigFOlderPath(), savedCfgName);
FileNetworkManager.Instance.ReadData(path, result =>
{
if (!string.IsNullOrEmpty(result))
{
callback?.Invoke(true, result);
}
});
@@ -187,7 +191,7 @@ namespace SGModule.ConfigLoader
});
return;
}
Debug.Log("是否需要下载"+HasNewConfig(initOptions.Setting));
if (HasNewConfig(initOptions.Setting))
{
DownloadConfig(initOptions.CdnUrl, initOptions.Setting, (success, json) =>
@@ -215,7 +215,7 @@ namespace SGModule.ConfigLoader
// 本地文件路径
fullPath = "file://" + path;
}
Debug.Log(fullPath);
// 使用UnityWebRequest读取数据
using (var webRequest = UnityWebRequest.Get(fullPath))
{