diff --git a/Assets/YooAsset/Editor/AssetArtReporter/AssetArtReporterWindow.cs b/Assets/YooAsset/Editor/AssetArtReporter/AssetArtReporterWindow.cs
index 7ac77b5a..7793c3f1 100644
--- a/Assets/YooAsset/Editor/AssetArtReporter/AssetArtReporterWindow.cs
+++ b/Assets/YooAsset/Editor/AssetArtReporter/AssetArtReporterWindow.cs
@@ -7,7 +7,6 @@ using UnityEditor;
using UnityEngine;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
-using UnityEngine.Tilemaps;
namespace YooAsset.Editor
{
diff --git a/Assets/YooAsset/Editor/AssetArtReporter/EHeaderType.cs b/Assets/YooAsset/Editor/AssetArtReporter/EHeaderType.cs
index 4e65a1ff..9f38fc19 100644
--- a/Assets/YooAsset/Editor/AssetArtReporter/EHeaderType.cs
+++ b/Assets/YooAsset/Editor/AssetArtReporter/EHeaderType.cs
@@ -1,7 +1,4 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
+
namespace YooAsset.Editor
{
public enum EHeaderType
diff --git a/Assets/YooAsset/Editor/AssetArtReporter/ReportHeader.cs b/Assets/YooAsset/Editor/AssetArtReporter/ReportHeader.cs
index 2aadf716..4009c367 100644
--- a/Assets/YooAsset/Editor/AssetArtReporter/ReportHeader.cs
+++ b/Assets/YooAsset/Editor/AssetArtReporter/ReportHeader.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections;
-using System.Collections.Generic;
namespace YooAsset.Editor
{
diff --git a/Assets/YooAsset/Editor/AssetArtScanner/AssetArtCollector.cs b/Assets/YooAsset/Editor/AssetArtScanner/AssetArtCollector.cs
index 59dd82b9..3618a7f6 100644
--- a/Assets/YooAsset/Editor/AssetArtScanner/AssetArtCollector.cs
+++ b/Assets/YooAsset/Editor/AssetArtScanner/AssetArtCollector.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
namespace YooAsset.Editor
{
diff --git a/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScanner.cs b/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScanner.cs
index 2b0c042a..46d1ec8d 100644
--- a/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScanner.cs
+++ b/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScanner.cs
@@ -26,6 +26,7 @@ namespace YooAsset.Editor
///
/// 扫描模式
+ /// 注意:文件路径或文件GUID
///
public string ScannerSchema = string.Empty;
diff --git a/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScannerWindow.cs b/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScannerWindow.cs
index 4c04be8f..194cfa95 100644
--- a/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScannerWindow.cs
+++ b/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScannerWindow.cs
@@ -25,8 +25,8 @@ namespace YooAsset.Editor
private Label _schemaGuideTxt;
private TextField _scannerNameTxt;
private TextField _scannerDescTxt;
- private ObjectField _scanSchemaField;
- private ObjectField _saveFolderField;
+ private ObjectField _scannerSchemaField;
+ private ObjectField _outputFolderField;
private ScrollView _collectorScrollView;
private int _lastModifyScannerIndex = 0;
@@ -68,7 +68,10 @@ namespace YooAsset.Editor
_scannerListView = root.Q("ScannerListView");
_scannerListView.makeItem = MakeScannerListViewItem;
_scannerListView.bindItem = BindScannerListViewItem;
-#if UNITY_2020_1_OR_NEWER
+
+#if UNITY_2022_3_OR_NEWER
+ _scannerListView.selectionChanged += ScannerListView_onSelectionChange;
+#elif UNITY_2020_1_OR_NEWER
_scannerListView.onSelectionChange += ScannerListView_onSelectionChange;
#else
_scannerListView.onSelectionChanged += ScannerListView_onSelectionChange;
@@ -120,22 +123,21 @@ namespace YooAsset.Editor
});
// 扫描模式
- _scanSchemaField = root.Q("ScanSchema");
- _scanSchemaField.RegisterValueChangedCallback(evt =>
+ _scannerSchemaField = root.Q("ScanSchema");
+ _scannerSchemaField.RegisterValueChangedCallback(evt =>
{
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
if (selectScanner != null)
{
string assetPath = AssetDatabase.GetAssetPath(evt.newValue);
- _scanSchemaField.value.name = assetPath;
selectScanner.ScannerSchema = AssetDatabase.AssetPathToGUID(assetPath);
AssetArtScannerSettingData.ModifyScanner(selectScanner);
}
});
// 存储目录
- _saveFolderField = root.Q("SaveFolder");
- _saveFolderField.RegisterValueChangedCallback(evt =>
+ _outputFolderField = root.Q("OutputFolder");
+ _outputFolderField.RegisterValueChangedCallback(evt =>
{
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
if (selectScanner != null)
@@ -143,7 +145,6 @@ namespace YooAsset.Editor
string assetPath = AssetDatabase.GetAssetPath(evt.newValue);
if (AssetDatabase.IsValidFolder(assetPath))
{
- _saveFolderField.value.name = assetPath;
selectScanner.SaveDirectory = assetPath;
AssetArtScannerSettingData.ModifyScanner(selectScanner);
}
@@ -326,13 +327,13 @@ namespace YooAsset.Editor
var scanSchema = selectScanner.LoadSchema();
if (scanSchema == null)
{
- _scanSchemaField.SetValueWithoutNotify(null);
+ _scannerSchemaField.SetValueWithoutNotify(null);
_schemaGuideTxt.text = string.Empty;
Selection.activeObject = null;
}
else
{
- _scanSchemaField.SetValueWithoutNotify(scanSchema);
+ _scannerSchemaField.SetValueWithoutNotify(scanSchema);
_schemaGuideTxt.text = scanSchema.GetUserGuide();
Selection.activeObject = scanSchema;
}
@@ -341,11 +342,11 @@ namespace YooAsset.Editor
DefaultAsset saveFolder = AssetDatabase.LoadAssetAtPath(selectScanner.SaveDirectory);
if (saveFolder == null)
{
- _saveFolderField.SetValueWithoutNotify(null);
+ _outputFolderField.SetValueWithoutNotify(null);
}
else
{
- _saveFolderField.SetValueWithoutNotify(saveFolder);
+ _outputFolderField.SetValueWithoutNotify(saveFolder);
}
FillCollectorViewData();
diff --git a/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScannerWindow.uxml b/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScannerWindow.uxml
index 448142ef..98f4f7a7 100644
--- a/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScannerWindow.uxml
+++ b/Assets/YooAsset/Editor/AssetArtScanner/AssetArtScannerWindow.uxml
@@ -22,8 +22,8 @@
-
-
+
+