From 65d35b09d68bebf0eeabadc6c1963efa2fe0a52d Mon Sep 17 00:00:00 2001 From: yangbear Date: Mon, 6 Jul 2026 05:09:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20ChanraoTuibuHandler=E8=A1=A5=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E9=9A=90=E8=97=8F+OnMouseDown=E6=98=BE=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Interaction/ChanraoTuibuHandler.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Interaction/ChanraoTuibuHandler.cs b/Assets/Scripts/Interaction/ChanraoTuibuHandler.cs index b875082..37f650a 100644 --- a/Assets/Scripts/Interaction/ChanraoTuibuHandler.cs +++ b/Assets/Scripts/Interaction/ChanraoTuibuHandler.cs @@ -8,7 +8,7 @@ public class ChanraoTuibuHandler : MonoBehaviour void OnEnable() { if (GetComponent() == null) gameObject.AddComponent().radius = 0.5f; - CreateOutlineMesh(); + foreach (var r in GetComponentsInChildren(true)) r.enabled = false; CreateOutlineMesh(); StopAllCoroutines(); StartCoroutine(BlinkOutline()); Debug.Log($"[ChanraoTuibu] OnEnable outline={_outlineMesh!=null}"); @@ -46,7 +46,8 @@ public class ChanraoTuibuHandler : MonoBehaviour Debug.Log($"[ChanraoTuibu] {name} 被点击"); StopAllCoroutines(); if (_outlineMesh != null) _outlineMesh.enabled = false; - // 显示模型 + var mr = GetComponent(); if (mr != null) mr.enabled = true; + foreach (var r in GetComponentsInChildren(true)) r.enabled = true; // 显示模型 var mr = GetComponent(); if (mr != null) mr.enabled = true; foreach (var r in GetComponentsInChildren(true)) r.enabled = true;