test again

This commit is contained in:
FloatGaming
2026-07-23 23:16:18 +08:00
parent 304a13aa7d
commit 094b7b775d
+12
View File
@@ -32,6 +32,10 @@ public static class PackagingResetTool
[MenuItem("Tools/Packaging/一键初始化打包设置(恢复默认)", false, 0)]
public static void ResetForPackaging()
{
bool isBatchMode = Application.isBatchMode;
if (!isBatchMode)
{
bool confirmed = EditorUtility.DisplayDialog(
"一键初始化打包设置",
@@ -50,6 +54,11 @@ public static class PackagingResetTool
{
return;
}
}
else
{
Debug.Log("[PackagingReset] BatchMode 检测到,跳过确认弹窗,直接执行重置。");
}
var report = new StringBuilder();
int errors = 0;
@@ -88,11 +97,14 @@ public static class PackagingResetTool
: "打包初始化完成,但有 " + errors + " 处警告/错误,请查看下方明细。\n\n");
Debug.Log("[PackagingReset]\n" + report);
if (!isBatchMode)
{
EditorUtility.DisplayDialog(
errors == 0 ? "初始化完成" : "初始化完成(有警告)",
report.ToString(),
"好");
}
}
private static int ResetPlayers(StringBuilder report)
{