using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
public class StartDrage : MonoBehaviour, IPointerEnterHandler, IPointerUpHandler, IPointerDownHandler
{
private Vector3 startPos;//ui的起始位置
private Vector3 vec3;//按下鼠标的位置
private Vector3 pos;//UI的移动位置
private bool isTrue = false;//是否在鼠标上
private GameObject cam;//找到摄像机
// Use this for initialization
void Start()
{
startPos = transform.position;//记录一开始鼠标的位置
cam = GameObject.FindGameObjectWithTag("CamRay");//找到摄像机
}
void Update()
{
//拖拽UI
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
public class StartDrage : MonoBehaviour, IPointerEnterHandler, IPointerUpHandler, IPointerDownHandler
{
private Vector3 startPos;//ui的起始位置
private Vector3 vec3;//按下鼠标的位置
private Vector3 pos;//UI的移动位置
private bool isTrue = false;//是否在鼠标上
private GameObject cam;//找到摄像机
// Use this for initialization
void Start()
{
startPos = transform.position;//记录一开始鼠标的位置
cam = GameObject.FindGameObjectWithTag("CamRay");//找到摄像机
}
void Update()
{
//拖拽UI