提交
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user