From e2aca734f9d9d27743d9331549e5a1a3f9401df8 Mon Sep 17 00:00:00 2001 From: yangbear Date: Sun, 12 Jul 2026 05:12:27 +0800 Subject: [PATCH] Fix double click bug in PingClickHandler by clearing blinking flag early --- Assets/Scripts/Interaction/PingClickHandler.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Interaction/PingClickHandler.cs b/Assets/Scripts/Interaction/PingClickHandler.cs index 9839f3b..7c043df 100644 --- a/Assets/Scripts/Interaction/PingClickHandler.cs +++ b/Assets/Scripts/Interaction/PingClickHandler.cs @@ -96,6 +96,10 @@ public class PingClickHandler : MonoBehaviour if (hit.collider != null && hit.collider.gameObject == gameObject) { Debug.Log($"[PingClick] Update手动射线贯穿点中 (使用相机: {c.name}): {name}"); + + // FIX BUG: Prevent multiple clicks in the same frame + _isBlinking = false; + PerformClick(); return; } @@ -106,12 +110,6 @@ public class PingClickHandler : MonoBehaviour public void PerformClick() { - if (!_isBlinking) - { - Debug.Log($"[PingClick] {name} 忽略点击,因为 _isBlinking=false"); - return; - } - if (!_modelShown) { _modelShown = true;