Example #1
0
    protected override void OnDragDropStart()
    {
        if (!draggedItems.Contains(this))
        {
            draggedItems.Add(this);
        }

        // Automatically disable the scroll view
        if (mDragScrollView != null)
        {
            mDragScrollView.enabled = false;
        }

        // Disable the collider so that it doesn't intercept events
        if (mButton != null)
        {
            mButton.isEnabled = false;
        }
        else if (mCollider != null)
        {
            mCollider.enabled = false;
        }
        else if (mCollider2D != null)
        {
            mCollider2D.enabled = false;
        }

        WidgetEditorRoot.StartEdit(transform.position);
    }