diff --git a/CHANGELOG.md b/CHANGELOG.md index 56300fa..53a4680 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [1.0.83] - 2024-12-11 +1.#26 修复截图工具保存路径错误问题 +2.优化注释提示 + ## [1.0.82] - 2024-12-10 1.优化StaticModule搜索类不完全 2.优化Procedure流程模块会自动搜索子类添加 diff --git a/Editor/F8Helper/ScreenShotWindow.cs b/Editor/F8Helper/ScreenShotWindow.cs index 0f9738f..73e8f92 100644 --- a/Editor/F8Helper/ScreenShotWindow.cs +++ b/Editor/F8Helper/ScreenShotWindow.cs @@ -7,7 +7,7 @@ namespace F8Framework.Core.Editor public class CaptureWindow : EditorWindow { private string saveFileName = string.Empty; - private string saveDirPath = string.Empty; + private string saveDirPathKey = "CaptureSaveDirPathKey"; [UnityEditor.MenuItem("开发工具/截图工具", false, 102)] private static void Capture() @@ -24,26 +24,23 @@ private static void Capture() private void OnGUI() { + string buildPath = F8EditorPrefs.GetString(saveDirPathKey, Application.dataPath); EditorGUILayout.LabelField("输出目录 : "); - EditorGUILayout.LabelField(saveDirPath + "/"); - - if (string.IsNullOrEmpty(saveDirPath)) - { - saveDirPath = Application.dataPath + "/.."; - } + EditorGUILayout.LabelField(buildPath); if (GUILayout.Button("选择目录")) { - string path = EditorUtility.OpenFolderPanel("选择目录", saveDirPath, Application.dataPath); + string path = EditorUtility.OpenFolderPanel("选择目录", buildPath, Application.dataPath); if (!string.IsNullOrEmpty(path)) { - saveDirPath = path; + F8EditorPrefs.SetString(saveDirPathKey, path); } } if (GUILayout.Button("打开目录")) { - System.Diagnostics.Process.Start(saveDirPath); + string openPath = F8EditorPrefs.GetString(saveDirPathKey, Application.dataPath); + System.Diagnostics.Process.Start(openPath); } // insert blank line @@ -54,7 +51,8 @@ private void OnGUI() var resolution = GetMainGameViewSize(); int x = (int)resolution.x; int y = (int)resolution.y; - var outputPath = saveDirPath.Replace("Assets/..", "") + DateTime.Now.ToString($"{x}x{y}_yyyy_MM_dd_HH_mm_ss") + ".png"; + LogF8.LogConfig(buildPath); + var outputPath = buildPath + "/" + DateTime.Now.ToString($"{x}x{y}_yyyy_MM_dd_HH_mm_ss") + ".png"; ScreenCapture.CaptureScreenshot(outputPath); LogF8.Log("保存路径:" + outputPath); } diff --git a/Launcher/GameLauncher.cs b/Launcher/GameLauncher.cs index de8f229..e6274dc 100644 --- a/Launcher/GameLauncher.cs +++ b/Launcher/GameLauncher.cs @@ -33,7 +33,7 @@ IEnumerator Start() FF8.Tween = ModuleCenter.CreateModule(); FF8.UI = ModuleCenter.CreateModule(); #if UNITY_WEBGL - yield return F8DataManager.Instance.LoadLocalizedStringsIEnumerator(); // WebGL专用,如果游戏中没有使用本地化模块,可以删除此方法的调用! + yield return F8DataManager.Instance.LoadLocalizedStringsIEnumerator(); // WebGL专用 #endif FF8.Local = ModuleCenter.CreateModule(); FF8.SDK = ModuleCenter.CreateModule(); diff --git a/Tests/Localization/Example/Scripts/LanguageCycler.cs b/Tests/Localization/Example/Scripts/LanguageCycler.cs index d592f18..535c192 100644 --- a/Tests/Localization/Example/Scripts/LanguageCycler.cs +++ b/Tests/Localization/Example/Scripts/LanguageCycler.cs @@ -34,7 +34,7 @@ IEnumerator Start() FF8.Tween = ModuleCenter.CreateModule(); FF8.UI = ModuleCenter.CreateModule(); #if UNITY_WEBGL - yield return F8DataManager.Instance.LoadLocalizedStringsIEnumerator(); // WebGL专用,如果游戏中没有使用本地化,可以删除此方法的调用! + yield return F8DataManager.Instance.LoadLocalizedStringsIEnumerator(); // WebGL专用 #endif FF8.Local = ModuleCenter.CreateModule(); FF8.SDK = ModuleCenter.CreateModule(); diff --git a/package.json b/package.json index af64f0d..6345fc5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.tippinggame.f8framework", "displayName": "F8Framework", "description": "Unity F8Framework Core", - "version": "1.0.82", + "version": "1.0.83", "unity": "2021.3", "license": "MIT", "keywords": ["Unity", "Framework", "Core"],