diff --git a/Assets/Scripts/Conditions/ObjClickCondition.cs b/Assets/Scripts/Conditions/ObjClickCondition.cs index 91d073b8..6ebd36aa 100644 --- a/Assets/Scripts/Conditions/ObjClickCondition.cs +++ b/Assets/Scripts/Conditions/ObjClickCondition.cs @@ -56,6 +56,11 @@ namespace QFramework RaycastHit hit; if (Physics.Raycast(ray, out hit)) { + if (hit.collider.gameObject.layer == LayerMask.GetMask("Ignore")) + { + Debug.LogError("点击了忽略的物体" + hit.collider.gameObject.name); + return false; + } if (isRight) { return obj == hit.collider.gameObject;