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