diff --git a/Assets/YooAsset/Editor/AssetArtReporter/AssetArtReporterWindow.cs b/Assets/YooAsset/Editor/AssetArtReporter/AssetArtReporterWindow.cs
index 431f932e..e246c7ca 100644
--- a/Assets/YooAsset/Editor/AssetArtReporter/AssetArtReporterWindow.cs
+++ b/Assets/YooAsset/Editor/AssetArtReporter/AssetArtReporterWindow.cs
@@ -441,6 +441,8 @@ namespace YooAsset.Editor
columnStyle.Stretchable = header.Stretchable;
columnStyle.Searchable = header.Searchable;
columnStyle.Sortable = header.Sortable;
+ columnStyle.Counter = header.Counter;
+ columnStyle.Units = header.Units;
var column = new TableColumn(header.HeaderTitle, header.HeaderTitle, columnStyle);
column.MakeCell = () =>
{
diff --git a/Assets/YooAsset/Editor/AssetArtReporter/ReportHeader.cs b/Assets/YooAsset/Editor/AssetArtReporter/ReportHeader.cs
index 302aab1c..ca194dde 100644
--- a/Assets/YooAsset/Editor/AssetArtReporter/ReportHeader.cs
+++ b/Assets/YooAsset/Editor/AssetArtReporter/ReportHeader.cs
@@ -43,6 +43,16 @@ namespace YooAsset.Editor
///
public bool Sortable = false;
+ ///
+ /// 统计数量
+ ///
+ public bool Counter = false;
+
+ ///
+ /// 展示单位
+ ///
+ public string Units = string.Empty;
+
///
/// 数值类型
///
@@ -89,6 +99,16 @@ namespace YooAsset.Editor
Sortable = true;
return this;
}
+ public ReportHeader SetCounter()
+ {
+ Counter = true;
+ return this;
+ }
+ public ReportHeader SetUnits(string units)
+ {
+ Units = units;
+ return this;
+ }
public ReportHeader SetHeaderType(EHeaderType value)
{
HeaderType = value;
diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerAssetListViewer.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerAssetListViewer.cs
index 0d50e920..c41c82a9 100644
--- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerAssetListViewer.cs
+++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerAssetListViewer.cs
@@ -148,10 +148,11 @@ namespace YooAsset.Editor
// LoadingTime
{
- var columnStyle = new ColumnStyle(100);
+ var columnStyle = new ColumnStyle(130);
columnStyle.Stretchable = false;
columnStyle.Searchable = false;
columnStyle.Sortable = true;
+ columnStyle.Units = "ms";
var column = new TableColumn("LoadingTime", "Loading Time", columnStyle);
column.MakeCell = () =>
{
diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerOperationListViewer.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerOperationListViewer.cs
index 4c0674bb..4b5aa990 100644
--- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerOperationListViewer.cs
+++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerOperationListViewer.cs
@@ -170,10 +170,11 @@ namespace YooAsset.Editor
// ProcessTime
{
- var columnStyle = new ColumnStyle(100);
+ var columnStyle = new ColumnStyle(130);
columnStyle.Stretchable = false;
columnStyle.Searchable = false;
columnStyle.Sortable = true;
+ columnStyle.Units = "ms";
var column = new TableColumn("ProcessTime", "Process Time", columnStyle);
column.MakeCell = () =>
{
@@ -270,9 +271,9 @@ namespace YooAsset.Editor
// ProcessTime
{
ToolbarButton button = new ToolbarButton();
- button.text = "ProcessTime";
+ button.text = "ProcessTime (ms)";
button.style.flexGrow = 0;
- button.style.width = 100;
+ button.style.width = 130;
_bottomToolbar.Add(button);
}
@@ -422,7 +423,7 @@ namespace YooAsset.Editor
var label = new Label();
label.name = "ProcessTime";
label.style.flexGrow = 0f;
- label.style.width = 100;
+ label.style.width = 130;
label.style.unityTextAlign = TextAnchor.MiddleLeft;
container.Add(label);
}
diff --git a/Assets/YooAsset/Editor/UIElements/TableViewer/ColumnStyle.cs b/Assets/YooAsset/Editor/UIElements/TableViewer/ColumnStyle.cs
index 2f3eee8e..255bb1c0 100644
--- a/Assets/YooAsset/Editor/UIElements/TableViewer/ColumnStyle.cs
+++ b/Assets/YooAsset/Editor/UIElements/TableViewer/ColumnStyle.cs
@@ -46,6 +46,11 @@ namespace YooAsset.Editor
///
public bool Counter = false;
+ ///
+ /// 展示单位
+ ///
+ public string Units = string.Empty;
+
public ColumnStyle(Length width)
{
if (width.value > MaxValue)
diff --git a/Assets/YooAsset/Editor/UIElements/TableViewer/TableViewer.cs b/Assets/YooAsset/Editor/UIElements/TableViewer/TableViewer.cs
index dcfa11b3..d278e4fa 100644
--- a/Assets/YooAsset/Editor/UIElements/TableViewer/TableViewer.cs
+++ b/Assets/YooAsset/Editor/UIElements/TableViewer/TableViewer.cs
@@ -214,6 +214,16 @@ namespace YooAsset.Editor
}
}
+ // 设置展示单位
+ foreach (var column in _columns)
+ {
+ if (string.IsNullOrEmpty(column.ColumnStyle.Units) == false)
+ {
+ var toobarButton = GetHeaderElement(column.ElementName) as ToolbarButton;
+ toobarButton.text = $"{toobarButton.text} ({column.ColumnStyle.Units})";
+ }
+ }
+
// 设置升降符号
if (string.IsNullOrEmpty(_sortingHeader) == false)
{