From 542268932d256b50fc771c9caf210c07220bc08c Mon Sep 17 00:00:00 2001 From: yangbear Date: Tue, 30 Jun 2026 02:49:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20touchArray=E7=90=83=E4=BD=93=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E9=BB=91=E5=9C=BA=E5=90=8E=E6=89=8D=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=EF=BC=8C=E4=B8=8EmedicalBox=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 所有touchArray子级初始隐藏 - ActivateExperimentObjects()中同步激活point1 --- Assets/Scripts/UI/PageController.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/UI/PageController.cs b/Assets/Scripts/UI/PageController.cs index f59b2ba..18302a1 100644 --- a/Assets/Scripts/UI/PageController.cs +++ b/Assets/Scripts/UI/PageController.cs @@ -339,7 +339,7 @@ public class PageController : MonoBehaviour { Debug.Log("PageController: [ActivateExperimentObjects] 显示实验物件"); - // 用 includeInactive 搜索,避免 medicalBox inactive 时 Find 返回 null + // medicalBox var allObjects = FindObjectsOfType(true); foreach (var go in allObjects) { @@ -347,10 +347,18 @@ public class PageController : MonoBehaviour { go.SetActive(true); Debug.Log("PageController: medicalBox 已显示"); - return; + break; } } - Debug.LogWarning("PageController: 未找到 medicalBox"); + + // touchArray 的第一个球(point1) + var touch = GameObject.Find("touchArray"); + if (touch != null && touch.transform.childCount > 0) + { + var point1 = touch.transform.GetChild(0).gameObject; + point1.SetActive(true); + Debug.Log("PageController: touchArray/point1 已显示"); + } }