public void OnDrag(PointerEventData eventData) { if (!_editor.CanDragNode()) { return; } transform.position = Input.mousePosition; }
public void OnDrop(PointerEventData eventData) { if (null != editor._dragedPrefab && editor.CanDragNode()) { Vector2 localPos; RectTransformUtility.ScreenPointToLocalPointInRectangle(editor.GetModelZone(), Input.mousePosition, null, out localPos); editor.CreateNode(localPos, editor._dragedPrefab); } }