VisualElement MakeListViewItem()
        {
            // ListView changes user created VisualElements in a way that no reversible using public API
            // Wrapping pooled item in a non reusable container prevent us from reusing a pooled item in an eventual checked pseudo state
            var wrapper = new VisualElement();

            wrapper.Add(SystemInformationVisualElement.Acquire(this, m_World));
            return(wrapper);
        }
Exemplo n.º 2
0
        public static void ReturnToPool(SystemScheduleTreeView treeView, SystemInformationVisualElement item)
        {
            if (!k_PerTreeViewElements.TryGetValue(treeView, out var list))
            {
                return;
            }

            if (list.Remove(item))
            {
                Pool <SystemInformationVisualElement> .Release(item);
            }
        }
 VisualElement MakeTreeViewItem() => SystemInformationVisualElement.Acquire(this, m_World);