public static void ClearCraftingSlots() { for (int i = 25; i > 19; i--) { if (slots[i].item != DragDrop.GetCurrentItem()) { slots[i].ClearSlot(); } } }
public void OnDrop(PointerEventData eventData) { if (slotNumber != 26) { if (eventData.pointerDrag != null) { AddItem(DragDrop.GetCurrentItem()); currentSlot = this; eventData.pointerDrag.GetComponent <RectTransform>().anchoredPosition = GetComponent <RectTransform>().anchoredPosition + new Vector2(-99, 139); } } }