update asset art scanner

pull/464/head
何冠峰 2025-01-22 19:17:05 +08:00
parent cbb8472153
commit 415f844982
4 changed files with 25 additions and 20 deletions

View File

@ -15,7 +15,7 @@ namespace YooAsset.Editor
[MenuItem("YooAsset/AssetArt Reporter", false, 302)]
public static AssetArtReporterWindow OpenWindow()
{
AssetArtReporterWindow window = GetWindow<AssetArtReporterWindow>("资源扫描报告", true, WindowsDefine.DockedWindowTypes);
AssetArtReporterWindow window = GetWindow<AssetArtReporterWindow>("AssetArt Reporter", true, WindowsDefine.DockedWindowTypes);
window.minSize = new Vector2(800, 600);
return window;
}
@ -247,7 +247,7 @@ namespace YooAsset.Editor
}
private void FixSelectBtn_clicked()
{
if (EditorUtility.DisplayDialog("提示", "修复所有选中资源(白名单除外", "Yes", "No"))
if (EditorUtility.DisplayDialog("提示", "修复所有选中资源(包含白名单)", "Yes", "No"))
{
if (_reportCombiner != null)
_reportCombiner.FixSelect();

View File

@ -1,13 +1,13 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
<uie:Toolbar name="Toolbar" style="display: flex; flex-direction: row;">
<uie:ToolbarSearchField focusable="true" name="SearchField" style="flex-grow: 1;" />
<ui:Button text="显示通过元素" display-tooltip-when-elided="true" name="StateVisibleButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="显示白名单元素" display-tooltip-when-elided="true" name="WhiteVisibleButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="导出选中文件" display-tooltip-when-elided="true" name="ExportFilesButton" style="width: 80px; background-color: rgb(56, 147, 58);" />
<ui:Button text="修复选中" display-tooltip-when-elided="true" name="FixSelectButton" style="width: 60px; background-color: rgb(56, 147, 58);" />
<ui:Button text="修复所有" display-tooltip-when-elided="true" name="FixAllButton" style="width: 60px; background-color: rgb(56, 147, 58);" />
<ui:Button text="单个导入" display-tooltip-when-elided="true" name="SingleImportButton" style="width: 60px; background-color: rgb(56, 147, 58);" />
<ui:Button text="合并导入" display-tooltip-when-elided="true" name="MultiImportButton" style="width: 60px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Show Passes" display-tooltip-when-elided="true" name="StateVisibleButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Show WhiteList" display-tooltip-when-elided="true" name="WhiteVisibleButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Export Select" display-tooltip-when-elided="true" name="ExportFilesButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Fix Select" display-tooltip-when-elided="true" name="FixSelectButton" style="width: 80px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Fix All" display-tooltip-when-elided="true" name="FixAllButton" style="width: 80px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Import Single" display-tooltip-when-elided="true" name="SingleImportButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Import Multiple " display-tooltip-when-elided="true" name="MultiImportButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
</uie:Toolbar>
<ui:VisualElement name="PublicContainer" style="background-color: rgb(79, 79, 79); flex-direction: column; border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; border-bottom-width: 5px;">
<ui:Label text="标题" display-tooltip-when-elided="true" name="ReportTitle" style="height: 16px; -unity-font-style: bold; -unity-text-align: middle-center;" />

View File

@ -14,7 +14,7 @@ namespace YooAsset.Editor
[MenuItem("YooAsset/AssetArt Scanner", false, 301)]
public static void OpenWindow()
{
AssetArtScannerWindow window = GetWindow<AssetArtScannerWindow>("资源扫描工具", true, WindowsDefine.DockedWindowTypes);
AssetArtScannerWindow window = GetWindow<AssetArtScannerWindow>("AssetArt Scanner", true, WindowsDefine.DockedWindowTypes);
window.minSize = new Vector2(800, 600);
}
@ -241,9 +241,16 @@ namespace YooAsset.Editor
}
private void ScanAllBtn_clicked()
{
string searchKeyWord = _scannerSearchField.value;
AssetArtScannerSettingData.ScanAll(searchKeyWord);
AssetDatabase.Refresh();
if (EditorUtility.DisplayDialog("提示", $"开始全面扫描!", "Yes", "No"))
{
string searchKeyWord = _scannerSearchField.value;
AssetArtScannerSettingData.ScanAll(searchKeyWord);
AssetDatabase.Refresh();
}
else
{
Debug.LogWarning("全面扫描已经取消");
}
}
private void ScanBtn_clicked()
{

View File

@ -1,15 +1,13 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
<uie:Toolbar name="Toolbar" style="display: flex; flex-direction: row-reverse;">
<ui:Button text="Save" display-tooltip-when-elided="true" name="SaveButton" style="width: 50px; background-color: rgb(56, 147, 58);" />
<ui:Button text="导出" display-tooltip-when-elided="true" name="ExportButton" style="width: 50px; background-color: rgb(56, 147, 58);" />
<ui:Button text="导入" display-tooltip-when-elided="true" name="ImportButton" style="width: 50px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Export" display-tooltip-when-elided="true" name="ExportButton" style="width: 50px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Import" display-tooltip-when-elided="true" name="ImportButton" style="width: 50px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Scan All" display-tooltip-when-elided="true" name="ScanAllButton" style="width: 80px; background-color: rgb(56, 147, 58);" />
</uie:Toolbar>
<ui:VisualElement name="PublicContainer" style="background-color: rgb(79, 79, 79); flex-direction: column; border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; border-bottom-width: 5px;">
<ui:Button text="Scan All" display-tooltip-when-elided="true" name="ScanAllButton" style="height: 25px; -unity-font-style: bold;" />
</ui:VisualElement>
<ui:VisualElement name="ContentContainer" style="flex-grow: 1; flex-direction: row;">
<ui:VisualElement name="ScannerListContainer" style="width: 250px; flex-grow: 0; background-color: rgb(67, 67, 67); border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; border-bottom-width: 5px;">
<ui:Label text="列表" display-tooltip-when-elided="true" name="ScannerListTitle" style="background-color: rgb(89, 89, 89); -unity-text-align: upper-center; -unity-font-style: bold; border-left-width: 3px; border-right-width: 3px; border-top-width: 3px; border-bottom-width: 3px; font-size: 12px;" />
<ui:Label text="Scanner List" display-tooltip-when-elided="true" name="ScannerListTitle" style="background-color: rgb(89, 89, 89); -unity-text-align: upper-center; -unity-font-style: bold; border-left-width: 3px; border-right-width: 3px; border-top-width: 3px; border-bottom-width: 3px; font-size: 12px;" />
<uie:ToolbarSearchField focusable="true" name="ScannerSearchField" style="width: 230px;" />
<ui:ListView focusable="true" name="ScannerListView" item-height="20" virtualization-method="DynamicHeight" style="flex-grow: 1;" />
<ui:VisualElement name="ScannerAddContainer" style="justify-content: center; flex-direction: row; flex-shrink: 0;">
@ -18,7 +16,7 @@
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="ScannerContentContainer" style="flex-grow: 1; border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; border-bottom-width: 5px; min-width: 400px;">
<ui:Label text="扫描器" display-tooltip-when-elided="true" name="ScannerContentTitle" style="-unity-text-align: upper-center; -unity-font-style: bold; font-size: 12px; border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; background-color: rgb(89, 89, 89);" />
<ui:Label text="Scanner" display-tooltip-when-elided="true" name="ScannerContentTitle" style="-unity-text-align: upper-center; -unity-font-style: bold; font-size: 12px; border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; background-color: rgb(89, 89, 89);" />
<ui:Label display-tooltip-when-elided="true" name="SchemaUserGuide" style="-unity-text-align: upper-center; -unity-font-style: bold; border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; border-bottom-width: 5px; font-size: 12px; height: 40px;" />
<ui:TextField picking-mode="Ignore" label="Scanner Name" name="ScannerName" />
<ui:TextField picking-mode="Ignore" label="Scanner Desc" name="ScannerDesc" />