20 lines
404 B
C#
20 lines
404 B
C#
|
using UnityEngine;
|
||
|
using UnityEngine.EventSystems;
|
||
|
|
||
|
public class PointFollow : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler
|
||
|
{
|
||
|
public void OnBeginDrag(PointerEventData eventData)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
public void OnDrag(PointerEventData eventData)
|
||
|
{
|
||
|
transform.position = eventData.position;
|
||
|
}
|
||
|
|
||
|
public void OnEndDrag(PointerEventData eventData)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|