Ejemplo n.º 1
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (eventData.dragging)
     {
         ghost = Instantiate(eventData.pointerDrag, content);
         RectTransform r = ghost.transform as RectTransform;
         r.sizeDelta = new Vector2(r.sizeDelta.x, InstructionList.height);
         index       = this.GetIndex(eventData);
         if (index == list.GetLength())
         {
             index--;
         }
         list.ghostIndex = index;
         ghost.transform.SetSiblingIndex(index);
         LayoutRebuilder.ForceRebuildLayoutImmediate(content);
         isDragging = true;
     }
 }