public void OnDrag(PointerEventData eventData)
{
transform.localPosition = Input.mousePosition;
}
public void OnDrop(PointerEventData eventData)
{
transform.localPosition = StartPos;
}
Vector2 pos;
RectTransformUtility.ScreenPointToLocalPointInRectangle(this.transform as RectTransform, Input.mousePosition, this.worldCamera, out pos);
this.transform.position = this.transform.TransformPoint(pos);
StartPos = transform.localPosition;
this.transform.localPosition = StartPos;