增加报错提示

This commit is contained in:
shenjianxing 2025-01-13 17:18:29 +08:00
parent ce0ef2c158
commit 8fa25c6fe5

View File

@ -43,9 +43,13 @@ namespace QFramework
else else
{ {
obj = DeviceController.Instance.GetDeviceObj(deviceName); obj = DeviceController.Instance.GetDeviceObj(deviceName);
if (obj == null)
{
Debug.LogError($"没有找到 path:{path} deviceName:{deviceName}");
} }
} }
if (obj != null && Input.GetMouseButtonUp(0) && EventSystem.current.IsPointerOverGameObject() == false) }
if (Input.GetMouseButtonUp(0) && EventSystem.current.IsPointerOverGameObject() == false)
{ {
Vector3 mousePos = Input.mousePosition; Vector3 mousePos = Input.mousePosition;
Ray ray = Camera.main.ScreenPointToRay(mousePos); Ray ray = Camera.main.ScreenPointToRay(mousePos);
@ -62,6 +66,8 @@ namespace QFramework
} }
} }
} }
return false; return false;
} }
public bool Paused { get; set; } public bool Paused { get; set; }