From c7d554be9f685bed4a18874014c70c33c41e4f27 Mon Sep 17 00:00:00 2001 From: changyunjia <905640960@qq.com> Date: Fri, 12 Jun 2026 15:35:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SGModule/Scripts/ConfigLoader/ConfigFileManager.cs | 5 ++++- .../SGModule/Scripts/ConfigLoader/FileNetworkManager.cs | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/SGModule/ConfigLoader/SGModule/Scripts/ConfigLoader/ConfigFileManager.cs b/Assets/SGModule/ConfigLoader/SGModule/Scripts/ConfigLoader/ConfigFileManager.cs index 930ed97..bda9583 100644 --- a/Assets/SGModule/ConfigLoader/SGModule/Scripts/ConfigLoader/ConfigFileManager.cs +++ b/Assets/SGModule/ConfigLoader/SGModule/Scripts/ConfigLoader/ConfigFileManager.cs @@ -46,15 +46,18 @@ namespace SGModule.ConfigLoader private void FirstLaunchCopyConfig(Action 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; } diff --git a/Assets/SGModule/ConfigLoader/SGModule/Scripts/ConfigLoader/FileNetworkManager.cs b/Assets/SGModule/ConfigLoader/SGModule/Scripts/ConfigLoader/FileNetworkManager.cs index 55177a5..e5d66e6 100644 --- a/Assets/SGModule/ConfigLoader/SGModule/Scripts/ConfigLoader/FileNetworkManager.cs +++ b/Assets/SGModule/ConfigLoader/SGModule/Scripts/ConfigLoader/FileNetworkManager.cs @@ -50,7 +50,7 @@ namespace SGModule.ConfigLoader { Directory.CreateDirectory(_configFolderPath); } -Debug.Log("0000000000000000000000000000002"); + Debug.Log("0000000000000000000000000000002"); CopyFile(onComplete); } @@ -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");