コード例 #1
0
    public void OnDrag(PointerEventData eventData)
    {
        dragRectTransform.anchoredPosition += eventData.delta / canvas.scaleFactor;

        if (nextBlock != null)
        {
            nextBlock.OnDrag(eventData);
        }
    }
コード例 #2
0
    public void OnDrag(PointerEventData eventData)
    {
        dragRectTransform.anchoredPosition += eventData.delta / canvas.scaleFactor;

        /*     dragRectTransform.anchoredPosition = UIUtility.KeepFullyOnScreen(gameObject, dragRectTransform.anchoredPosition, canvas.GetComponent<RectTransform>());*/

        if (nextBlock != null)
        {
            nextBlock.OnDrag(eventData);
        }
    }