using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class DragBox : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {

    }

    public void DragEvent()
    {
        Vector3 p = Input.mousePosition;
        var cam = FindObjectOfType<Camera>().gameObject;
        p.z = 0 - cam.transform.position.z;
        transform.position = Camera.main.ScreenToWorldPoint(p);
    }

    public void ClickEvent()
    {
        Debug.Log("click");
    }
}
