void MakeSelectiveSkillSlots() { if (playerSelectiveSkills) { for (int i = 0; i < playerSelectiveSkills.mySelectiveSkills.Count; i++) { GameObject temp = Instantiate(blankSkillSlot, selectiveSkillPanel.transform.position, Quaternion.identity); temp.transform.SetParent(selectiveSkillPanel.transform); SkillSlot newSlot = temp.GetComponent <SkillSlot>(); newSlot.Setup(playerSelectiveSkills.mySelectiveSkills[i], this); if (newSlot) { if (!newSlot.thisSkill.isSelected) { newSlot.skillSelectionImage.sprite = newSlot.SelectionIcons()[0]; } else if (newSlot.thisSkill.isSelected) { newSlot.skillSelectionImage.sprite = newSlot.SelectionIcons()[1]; } } newSlot.gameObject.transform.localScale = new Vector3(1, 1, 1); } } }