初识UGUI
如何实现UGUI图片拖动
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using System;
public class uguiMove : MonoBehaviour,IBeginDragHandler,IEndDragHandler,IDragHandler,IDropHandler
{
public RectTransform rectrom;
public void OnBeginDrag(PointerEventData eventData)
{
Debug.Log("OnBeginDrag___");
}
public void OnEndDrag(PointerEventData eventData)
{
Debug.Log("onBeginDrag___");
}
public void OnDrag(PointerEventData eventData)
{
Debug.Log("OnDrag___"+eventData.position);
}
public void OnDrop(PointerEventData eventData)
{
Debug.Log("OnDop____");
}
}