Example #1
0
        // Token: 0x06001AA9 RID: 6825 RVA: 0x0008C884 File Offset: 0x0008AA84
        public virtual void OnBeginDrag(PointerEventData eventData)
        {
            this.startPosition = base.transform.position;
            this.startRotation = base.transform.rotation;
            this.startParent   = base.transform.parent;
            this.startCanvas   = base.GetComponentInParent <Canvas>();
            this.canvasGroup.blocksRaycasts = false;
            if (this.restrictToDropZone)
            {
                this.startDropZone = base.GetComponentInParent <VRTK_UIDropZone>().gameObject;
                this.validDropZone = this.startDropZone;
            }
            this.SetDragPosition(eventData);
            VRTK_UIPointer pointer = this.GetPointer(eventData);

            if (pointer != null)
            {
                pointer.OnUIPointerElementDragStart(pointer.SetUIPointerEvent(pointer.pointerEventData.pointerPressRaycast, base.gameObject, null));
            }
        }
Example #2
0
        public virtual void OnBeginDrag(PointerEventData eventData)
        {
            startPosition = transform.position;
            startRotation = transform.rotation;
            startParent   = transform.parent;
            startCanvas   = GetComponentInParent <Canvas>();
            canvasGroup.blocksRaycasts = false;

            if (restrictToDropZone)
            {
                startDropZone = GetComponentInParent <VRTK_UIDropZone>().gameObject;
                validDropZone = startDropZone;
            }

            SetDragPosition(eventData);
            VRTK_UIPointer pointer = GetPointer(eventData);

            if (pointer != null)
            {
                pointer.OnUIPointerElementDragStart(pointer.SetUIPointerEvent(pointer.pointerEventData.pointerPressRaycast, gameObject));
            }
        }