提交
This commit is contained in:
@@ -148,12 +148,16 @@ namespace SGModule.ConfigLoader
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Debug.Log(savedCfgName);
|
||||||
FirstLaunchCopyConfig(success =>
|
FirstLaunchCopyConfig(success =>
|
||||||
{
|
{
|
||||||
|
savedCfgName = SavedConfigFileName;
|
||||||
|
path = Path.Combine(FileNetworkManager.Instance.GetConfigFOlderPath(), savedCfgName);
|
||||||
FileNetworkManager.Instance.ReadData(path, result =>
|
FileNetworkManager.Instance.ReadData(path, result =>
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(result))
|
if (!string.IsNullOrEmpty(result))
|
||||||
{
|
{
|
||||||
|
|
||||||
callback?.Invoke(true, result);
|
callback?.Invoke(true, result);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -187,7 +191,7 @@ namespace SGModule.ConfigLoader
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Debug.Log("是否需要下载"+HasNewConfig(initOptions.Setting));
|
||||||
if (HasNewConfig(initOptions.Setting))
|
if (HasNewConfig(initOptions.Setting))
|
||||||
{
|
{
|
||||||
DownloadConfig(initOptions.CdnUrl, initOptions.Setting, (success, json) =>
|
DownloadConfig(initOptions.CdnUrl, initOptions.Setting, (success, json) =>
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ namespace SGModule.ConfigLoader
|
|||||||
// 本地文件路径
|
// 本地文件路径
|
||||||
fullPath = "file://" + path;
|
fullPath = "file://" + path;
|
||||||
}
|
}
|
||||||
|
Debug.Log(fullPath);
|
||||||
// 使用UnityWebRequest读取数据
|
// 使用UnityWebRequest读取数据
|
||||||
using (var webRequest = UnityWebRequest.Get(fullPath))
|
using (var webRequest = UnityWebRequest.Get(fullPath))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user