public void OnConfirmEquipmentChange() { selectedInventorySlot = EventSystem.current.currentSelectedGameObject.GetComponent <InventorySlot>(); playableCharacterInfo.ChangeEquipment(selectedEquipmentSlot.equipmentType, (EquipmentObject)selectedInventorySlot.item); selectedEquipmentSlot.AssignSlot(selectedInventorySlot.item); this.gameObject.SetActive(false); }