From 8fa25c6fe5db1f0d3e4e6d9056b0999f11c616e6 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 13 Jan 2025 17:18:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8A=A5=E9=94=99=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Conditions/ObjClickCondition.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Conditions/ObjClickCondition.cs b/Assets/Scripts/Conditions/ObjClickCondition.cs index 68754b2c..91d073b8 100644 --- a/Assets/Scripts/Conditions/ObjClickCondition.cs +++ b/Assets/Scripts/Conditions/ObjClickCondition.cs @@ -43,9 +43,13 @@ namespace QFramework else { 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; Ray ray = Camera.main.ScreenPointToRay(mousePos); @@ -62,6 +66,8 @@ namespace QFramework } } } + + return false; } public bool Paused { get; set; }