Skip to content

Commit

Permalink
1.0.83 1.#26 修复截图工具保存路径错误问题,2.优化注释提示
Browse files Browse the repository at this point in the history
  • Loading branch information
TippingGame committed Dec 11, 2024
1 parent df8420b commit 0c89887
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.0.83] - 2024-12-11
1.#26 修复截图工具保存路径错误问题
2.优化注释提示

## [1.0.82] - 2024-12-10
1.优化StaticModule搜索类不完全
2.优化Procedure流程模块会自动搜索子类添加
Expand Down
20 changes: 9 additions & 11 deletions Editor/F8Helper/ScreenShotWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion Launcher/GameLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ IEnumerator Start()
FF8.Tween = ModuleCenter.CreateModule<Tween>();
FF8.UI = ModuleCenter.CreateModule<UIManager>();
#if UNITY_WEBGL
yield return F8DataManager.Instance.LoadLocalizedStringsIEnumerator(); // WebGL专用,如果游戏中没有使用本地化模块,可以删除此方法的调用!
yield return F8DataManager.Instance.LoadLocalizedStringsIEnumerator(); // WebGL专用
#endif
FF8.Local = ModuleCenter.CreateModule<Localization>();
FF8.SDK = ModuleCenter.CreateModule<SDKManager>();
Expand Down
2 changes: 1 addition & 1 deletion Tests/Localization/Example/Scripts/LanguageCycler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ IEnumerator Start()
FF8.Tween = ModuleCenter.CreateModule<Tween>();
FF8.UI = ModuleCenter.CreateModule<UIManager>();
#if UNITY_WEBGL
yield return F8DataManager.Instance.LoadLocalizedStringsIEnumerator(); // WebGL专用,如果游戏中没有使用本地化,可以删除此方法的调用!
yield return F8DataManager.Instance.LoadLocalizedStringsIEnumerator(); // WebGL专用
#endif
FF8.Local = ModuleCenter.CreateModule<Localization>();
FF8.SDK = ModuleCenter.CreateModule<SDKManager>();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit 0c89887

Please sign in to comment.