using System; using System.Collections; using System.Collections.Generic; using System.Reflection; using Newtonsoft.Json; using Unity.Mathematics; using UnityEngine; using UnityEngine.UIElements; namespace BITKit.IData { public abstract class UXIEnumerableBindingHandler : IUXDataBinder { public Type TargetType =>typeof(IEnumerable); public VisualElement VisualElement { get;private set; } protected object target { get; private set; } protected FieldInfo fieldInfo{ get; private set; } protected VisualElement container { get; private set; } protected Button addButton; protected readonly List interfaceList=new(); public VisualElement CreateUI(object target, FieldInfo fieldInfo) { if(VisualElement is not null){throw new InvalidOperationException($"已经创建了Inspector<{VisualElement.GetType().Name}>");} var exportAttribute = fieldInfo.GetCustomAttribute(); this.fieldInfo = fieldInfo; this.target = target; // VisualElement = new Foldout(); // // VisualElement.Create