public RecycledListItem CreateItem(Transform parent)
        {
            ObjectReferencePickerItem item = (ObjectReferencePickerItem)Instantiate(referenceItemPrefab, parent, false);

            item.Skin = Skin;

            return(item);
        }
        public void Close()
        {
            onReferenceChanged      = null;
            initialValue            = null;
            currentlySelectedObject = null;
            currentlySelectedItem   = null;

            references.Clear();
            filteredReferences.Clear();

            gameObject.SetActive(false);
        }
        public void OnItemClicked(RecycledListItem item)
        {
            if (currentlySelectedItem != null)
            {
                currentlySelectedItem.IsSelected = false;
            }

            currentlySelectedItem            = (ObjectReferencePickerItem)item;
            currentlySelectedObject          = currentlySelectedItem.Reference;
            currentlySelectedItem.IsSelected = true;

            if (onReferenceChanged != null)
            {
                onReferenceChanged(currentlySelectedItem.Reference);
            }
        }
        public void SetItemContent(RecycledListItem item)
        {
            ObjectReferencePickerItem it = (ObjectReferencePickerItem)item;

            it.SetContent(filteredReferences[it.Position]);

            if (it.Reference == currentlySelectedObject)
            {
                it.IsSelected         = true;
                currentlySelectedItem = it;
            }
            else
            {
                it.IsSelected = false;
            }

            it.Skin = Skin;
        }