using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class TapMoving : MonoBehaviour
{
public Camera cam;
public Variables variables;
public Vector2 vector2;
public Vector2 playerVector;
public GameObject objectThis;
public void Tap(InputAction.CallbackContext context)
{
Debug.Log(Mouse.current.position.x.ReadValue());
objectThis.transform.position = cam.ScreenToWorldPoint (new Vector3(Mouse.current.position.x.ReadValue(), Mouse.current.position.y.ReadValue(), 1));
}
Сделал