public void Show() { CloseWindow(); member = PlayerParty.Instance.partyMember; foreach (var item in member) { CharacterSlot characterSlot = Instantiate(characterSlotPrefab); characterSlot.playerCharacter = item; characterSlot.Show(); characterSlot.transform.SetParent(list.transform); characterSlots.Add(characterSlot); } }
public void Show() { CloseWindow(); member = Party.GetMember(); for (int i = 0; i < member.Count; i++) { CharacterSlot characterSlot = Instantiate(characterSlotPrefab, list.gameObject.transform); characterSlot.playerCharacter = member[i]; characterSlot.Show(); SelectableButton selectItem = characterSlot.selectableButton; selectItem.index = i; //characterSlot.transform.SetParent(list.transform); characterSlots.Add(characterSlot); selectItems.Add(characterSlot.selectableButton); } RegisterNavigation(); }