修复objclick bug

This commit is contained in:
shenjianxing 2025-01-08 14:56:51 +08:00
parent 684614b43b
commit f118173ae7
2 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,10 @@ namespace QFramework
}
if (obj != null)
{
if (obj.activeSelf == false)
{
Debug.LogError(obj.name + "当前是隐藏状态");
}
try
{
anim = obj.GetComponent<Animation>();

View File

@ -45,7 +45,7 @@ namespace QFramework
obj = DeviceController.Instance.GetDeviceObj(deviceName);
}
}
if (obj != null && Input.GetMouseButtonUp(0))
if (obj != null && Input.GetMouseButtonUp(0) && EventSystem.current.IsPointerOverGameObject() == false)
{
Vector3 mousePos = Input.mousePosition;
Ray ray = Camera.main.ScreenPointToRay(mousePos);