1
This commit is contained in:
@@ -15,6 +15,7 @@ namespace BITKit.GameEditor
|
||||
public class ScriptableObjectGroupEditor<T> : EditorWindow where T : ScriptableObject
|
||||
{
|
||||
protected virtual string AssetsPath => $"Assets/Artists/";
|
||||
protected virtual string ExportPathKey => $"{typeof(T).Name}.ExportPath";
|
||||
protected readonly List<T> List=new();
|
||||
|
||||
private ListView _listView;
|
||||
@@ -105,15 +106,26 @@ namespace BITKit.GameEditor
|
||||
|
||||
private void ExportData()
|
||||
{
|
||||
var exportPath = EditorUtility.OpenFolderPanel("select path", "",typeof(T).FullName);
|
||||
var path = Environment.CurrentDirectory;
|
||||
|
||||
if (PlayerPrefs.HasKey(ExportPathKey))
|
||||
{
|
||||
path = PlayerPrefs.GetString(ExportPathKey);
|
||||
}
|
||||
|
||||
var exportPath = EditorUtility.SaveFilePanel("select path", path, $"{typeof(T).Name}.bytes", "bytes");
|
||||
|
||||
if(string.IsNullOrEmpty(exportPath))return;
|
||||
|
||||
PlayerPrefs.SetString(ExportPathKey, exportPath);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
ExportData(exportPath);
|
||||
|
||||
}
|
||||
protected virtual void ExportData(string path)
|
||||
{
|
||||
|
||||
throw new NotImplementedException($"暂未实现{typeof(T).Name}的导出功能");
|
||||
}
|
||||
|
||||
protected virtual void ItemsChosen(IEnumerable<object> obj)
|
||||
|
Reference in New Issue
Block a user