提交
This commit is contained in:
@@ -46,15 +46,18 @@ namespace SGModule.ConfigLoader
|
||||
private void FirstLaunchCopyConfig(Action<bool> callback)
|
||||
{
|
||||
SetFirstLaunch();
|
||||
|
||||
Debug.Log("000000000000000000000000000000");
|
||||
FileNetworkManager.Instance.CopyStreamingAssetsToPersistentDataPath(result =>
|
||||
{
|
||||
Debug.Log("0000000000000000000000000000006");
|
||||
var isSuccess = false;
|
||||
if (result)
|
||||
{
|
||||
Debug.Log("0000000000000000000000000000007");
|
||||
var names = FileNetworkManager.Instance.GetFileNamesFromPersistentDataPath(FileNetworkManager.FolderName);
|
||||
if (names.Length > 0)
|
||||
{
|
||||
Debug.Log("0000000000000000000000000000008");
|
||||
SetSavedConfigFileName(names[0]);
|
||||
isSuccess = true;
|
||||
}
|
||||
|
||||
@@ -91,10 +91,12 @@ Debug.Log("0000000000000000000000000000002");
|
||||
string jsonFileName = jsonFile.name;
|
||||
Log.ConfigLoader.Info($"Loaded JSON Name:{jsonFileName} content: " + jsonFile.text);
|
||||
|
||||
Debug.Log("0000000000000000000000000000001");
|
||||
Debug.Log("0000000000000000000000000000004");
|
||||
var destFilePath = Path.Combine(_configFolderPath, jsonFileName);
|
||||
File.WriteAllBytes(destFilePath, jsonFile.bytes);
|
||||
Debug.Log("0000000000000000000000000000005");
|
||||
onComplete?.Invoke(true);
|
||||
|
||||
// }
|
||||
// else {
|
||||
// Log.ConfigLoader.Error("Failed to load JSON file");
|
||||
|
||||
Reference in New Issue
Block a user