private void recycleDownItems(ref RectTransform child) { RecycleContacts.Enqueue(child.gameObject); child.gameObject.name = "RecycleContacts " + RecycleContacts.Count; child.SetAsLastSibling(); child.gameObject.SetActive(false); AtEndID--; if (i > 0) { i--; } }
private void recycleUpItems(ref RectTransform child) { RecycleContacts.Enqueue(child.gameObject); child.gameObject.name = "RecycleContacts " + RecycleContacts.Count; child.SetAsFirstSibling(); child.gameObject.SetActive(false); //We update the container position, since after we delete something from the top, the container moves all of it's content up content.localPosition -= (Vector3)GetVector(GetSize(child)); dragOffset -= GetVector(GetSize(child)); AtStartID++; if (i > 0) { i--; } }