Skip to content
Open

update #1024

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3447,22 +3447,38 @@ public static void ShowBuildReport()

// has to be called in main thread
static void ShowBuildReportWithLastValues()
{
try
{
BRT_BuildReportWindow brtWindow = (BRT_BuildReportWindow)
EditorWindow.GetWindow(
typeof(BRT_BuildReportWindow),
false,
EDITOR_WINDOW_TITLE,
true
);

if (brtWindow != null)
{
//BRT_BuildReportWindow window = ScriptableObject.CreateInstance<BRT_BuildReportWindow>();
//window.ShowUtility();

//Debug.Log("showing build report window...");

//BRT_BuildReportWindow brtWindow = EditorWindow.GetWindow<BRT_BuildReportWindow>("Build Report", true, typeof(SceneView));
BRT_BuildReportWindow brtWindow = (BRT_BuildReportWindow)
EditorWindow.GetWindow(
typeof(BRT_BuildReportWindow),
false,
EDITOR_WINDOW_TITLE,
true
);
//BRT_BuildReportWindow brtWindow = EditorWindow.GetWindow(typeof(BRT_BuildReportWindow), false, "Build Report", true) as BRT_BuildReportWindow;
brtWindow.Init(_lastKnownBuildInfo);
}
else
{
Debug.LogError("Failed to create BRT_BuildReportWindow instance");
}
}
catch (System.Exception ex)
{
// 记录详细的错误信息
Debug.LogError($"Failed to show build report window: {ex.ToString()}");

// 可选:显示用户友好的错误提示
EditorUtility.DisplayDialog(
"Error",
"Unable to display build report. Please check the console for details.",
"OK"
);
}
}
}
} // namespace BuildReportTool
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using UnityEditor;
using UnityEditor;
using UnityEngine;

namespace BuildReportTool
Expand Down Expand Up @@ -192,5 +192,5 @@ public static string CreateReport(

return savedFilePath;
}
}
}
}