This commit is contained in:
CortexCore
2024-06-08 10:07:40 +08:00
parent ccc9957809
commit b9731c20a1
11 changed files with 231 additions and 44 deletions

View File

@@ -50,6 +50,10 @@ namespace BITKit.GameEditor
var listViewContainer = container.Create<VisualElement>();
var createContainer = listViewContainer.Create<VisualElement>();
var exportButton = leftSlider.Create<Button>();
exportButton.text = "导出";
exportButton.clicked += ExportData;
createContainer.style.flexDirection = FlexDirection.Row;
@@ -99,6 +103,19 @@ namespace BITKit.GameEditor
$"{GetType().Name} 已初始化,从{AssetsPath}获取到{List.Count}个{typeof(T).Name}");
}
private void ExportData()
{
var exportPath = EditorUtility.OpenFolderPanel("select path", "",typeof(T).FullName);
if(string.IsNullOrEmpty(exportPath))return;
ExportData(exportPath);
}
protected virtual void ExportData(string path)
{
}
protected virtual void ItemsChosen(IEnumerable<object> obj)
{
var selected = obj.FirstOrDefault() as Object;