Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEngine.EventSystems;
- public class ItemSlot : MonoBehaviour, IDropHandler
- {
- public void OnDrop(PointerEventData eventData)
- {
- if(transform.childCount == 0)
- {
- eventData.pointerDrag.GetComponent<DraggableItem>().parentAfterDrag = transform;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment