using System; using UnityEditor; using UnityEditor.Perception.Randomization; using UnityEditor.UIElements; using UnityEngine.UIElements; namespace Editor.Randomization.VisualElements.AssetSource { class AssetListItemElement : VisualElement { int m_Index; Type m_ItemType; SerializedProperty m_Property; public AssetListItemElement(SerializedProperty property, Type itemType) { m_Property = property; m_ItemType = itemType; } public void BindProperties(int i) { Clear(); var template = AssetDatabase.LoadAssetAtPath( $"{StaticData.uxmlDir}/AssetSource/{nameof(AssetListItemElement)}.uxml"); template.CloneTree(this); m_Index = i; var indexLabel = this.Q