From 0c898871791ab90fec74eff46710a6099643c45d Mon Sep 17 00:00:00 2001 From: TippingGame Date: Wed, 11 Dec 2024 10:10:15 +0800 Subject: [PATCH] =?UTF-8?q?1.0.83=201.#26=20=E4=BF=AE=E5=A4=8D=E6=88=AA?= =?UTF-8?q?=E5=9B=BE=E5=B7=A5=E5=85=B7=E4=BF=9D=E5=AD=98=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98=EF=BC=8C2.=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=B3=A8=E9=87=8A=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ Editor/F8Helper/ScreenShotWindow.cs | 20 +++++++++---------- Launcher/GameLauncher.cs | 2 +- .../Example/Scripts/LanguageCycler.cs | 2 +- package.json | 2 +- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56300fab..53a46804 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 0f9738f2..73e8f92f 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 de8f229a..e6274dc6 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 d592f18b..535c192b 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 af64f0dd..6345fc51 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"],