This commit is contained in:
CortexCore
2023-11-15 23:54:54 +08:00
parent ee3ecec6cb
commit 3c837a4a33
356 changed files with 73756 additions and 26493 deletions

View File

@@ -5,7 +5,6 @@ using UnityEditor;
using UnityEngine.UIElements;
using UnityEditor.UIElements;
using System.Linq;
using UnityEngine.AddressableAssets;
using BITKit;
using BITKit.UX;
namespace BITKit.Editors
@@ -24,18 +23,18 @@ namespace BITKit.Editors
}
public void CreateGUI()
{
root = Addressables.LoadAssetAsync<VisualTreeAsset>(nameof(ReferenceEditor)).WaitForCompletion().CloneTree();
rootVisualElement.Add(root);
listView = root.Q<ListView>(UXConstant.ContextListView);
var allList = AssetDatabase
.FindAssets($"t:{nameof(ReferenceSO)}")
.Select(x => AssetDatabase.GUIDToAssetPath(x))
.Select(x => AssetDatabase.LoadAssetAtPath<ReferenceSO>(x))
.ToList();
listView.itemsSource = allList;
// root = Addressables.LoadAssetAsync<VisualTreeAsset>(nameof(ReferenceEditor)).WaitForCompletion().CloneTree();
// rootVisualElement.Add(root);
//
// listView = root.Q<ListView>(UXConstant.ContextListView);
//
// var allList = AssetDatabase
// .FindAssets($"t:{nameof(ReferenceSO)}")
// .Select(x => AssetDatabase.GUIDToAssetPath(x))
// .Select(x => AssetDatabase.LoadAssetAtPath<ReferenceSO>(x))
// .ToList();
//
// listView.itemsSource = allList;
}
}
}