/* using System.Collections; using System.Collections.Generic; using UnityEngine; using BITKit; using UnityEditor; using UnityEditor.UIElements; using UnityEngine.UIElements; using System.Linq; using BITKit.UX; using UnityEngine.AddressableAssets; namespace BITFALL { public class ItemSOEditor : EditorWindow { VisualElement root; ListView listView; VisualElement inspector; List gameobjects; [MenuItem("Tools/ItemSO Editor")] static void Open() { var window = EditorWindow.GetWindow(); //window.titleContent = new("Reference Editor"); window.Show(); } public void CreateGUI() { root = Addressables.LoadAssetAsync(nameof(ItemSOEditor)).WaitForCompletion().CloneTree(); rootVisualElement.Add(root); listView = root.Q(UXConstant.ContextListView); inspector = root.Q(UXConstant.Inspector); gameobjects = AssetDatabase .FindAssets($"t:{nameof(InGameObjectsBase)}") .Select(x => AssetDatabase.GUIDToAssetPath(x)) .Select(x => AssetDatabase.LoadAssetAtPath(x)) .ToList(); listView.makeItem = MakeItem; listView.bindItem = Bind; listView.onSelectedIndicesChange += OnSelectedIndicesChange; listView.itemsSource = gameobjects; } VisualElement MakeItem() { var root = new VisualElement(); var label = new Label(); label.name = UXConstant.ContextLabel; var icon = new VisualElement(); icon.name = UXConstant.Icon; root.Add(label); root.Add(icon); return root; } void Bind(VisualElement visualElement, int index) { var _ = gameobjects[index]; visualElement.Q