fix new input mouse system
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class InGameMouseHandler : MonoBehaviour
|
||||
{
|
||||
@@ -49,7 +50,7 @@ public class InGameMouseHandler : MonoBehaviour
|
||||
|
||||
void Update()
|
||||
{
|
||||
var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
var ray = Camera.main.ScreenPointToRay(Mouse.current.position.ReadValue());
|
||||
if(EventSystem.current.IsPointerOverGameObject())
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user