コード例 #1
0
    public void OnDrop(PointerEventData eventData)
    {
        SC_CardDisplay _card = eventData.pointerDrag.GetComponent <SC_CardDisplay>();

        if (_card != null)
        {
            _card.returnTo = this.transform;
        }
    }
コード例 #2
0
    public void OnPointerExit(PointerEventData eventData)
    {
        if (eventData.pointerDrag == null)
        {
            return;
        }

        SC_CardDisplay _card = eventData.pointerDrag.GetComponent <SC_CardDisplay>();

        if (_card != null && _card.parantHolder == this.transform)
        {
            _card.parantHolder = _card.returnTo;
        }
    }