Beispiel #1
0
        private IEnumerator CreateReferenceItemCoroutine(PointerEventData eventData)
        {
            yield return(new WaitForSecondsRealtime(Hierarchy.DraggedReferenceHoldTime));

            if (!BoundTransform.IsNull())
            {
                RuntimeInspectorUtils.CreateDraggedReferenceItem(BoundTransform, eventData, Skin);
            }
        }
Beispiel #2
0
        private void OnPointerDown(PointerEventData eventData)
        {
            if (pointerHeldCoroutine != null)
            {
                return;
            }

            if (!Hierarchy.CreateDraggedReferenceOnHold)
            {
                return;
            }

            if (BoundTransform.IsNull())
            {
                return;
            }

            pointerHeldCoroutine = CreateReferenceItemCoroutine(eventData);
            StartCoroutine(pointerHeldCoroutine);
        }