void SelectItemUI(int itemIndex) { previousSelectedItemIndex = newSelectedItemIndex; newSelectedItemIndex = itemIndex; CharacterItemUI prevUiItem = GetItemUI(previousSelectedItemIndex); CharacterItemUI newUiItem = GetItemUI(newSelectedItemIndex); prevUiItem.DeselectItem(); newUiItem.SelectItem(); }