public void SetCount(int count) { _shownImages?.ForEach(image => _itemsPool.Release(image)); var spritesToShow = SelectSprites(count); _shownImages = spritesToShow.Select(sprite => { var item = _itemsPool.Borrow(); item.sprite = sprite; item.transform.SetParent(_container); return(item); }).ToList(); }