public void SetData(RecipeObject recipe) { var index = transform.GetSiblingIndex(); if (index < recipe.Specifications.Count) { var specification = recipe.Specifications[index]; var specIcon = _iconUtil.GetSpecificationIcon(specification.type); gameObject.SetActive(true); SetIcon(specIcon); SetCount(specification.value); } else { gameObject.SetActive(false); } }