//public draggable.Slot typeOfItem = draggable.Slot.INVENTORY; public void OnDrop(PointerEventData eventData) { //Debug.Log (eventData.pointerDrag + " OnDrop to " + gameObject.name); draggable d = eventData.pointerDrag.GetComponent <draggable> (); if (d != null && d.tag == gameObject.tag) // && (typeOfItem == d.typeOfItem || typeOfItem==draggable.Slot.INVENTORY ) { d.parentToReturnTo = this.transform; if (gameObject.name == "DropZone") { d.changeSlot(draggable.Slot.REST); Image img = d.GetComponent <Image> (); img.color = Color.red; GameController gamer = gc.GetComponent <GameController>(); gamer.DisabledZaphires(eventData.pointerDrag); } } }