fix: touchArray球体改为黑场后才出现,与medicalBox同步

- 所有touchArray子级初始隐藏
- ActivateExperimentObjects()中同步激活point1
This commit is contained in:
yangbear
2026-06-30 02:49:27 +08:00
parent 3d407dec63
commit 542268932d
+11 -3
View File
@@ -339,7 +339,7 @@ public class PageController : MonoBehaviour
{
Debug.Log("PageController: [ActivateExperimentObjects] 显示实验物件");
// 用 includeInactive 搜索,避免 medicalBox inactive 时 Find 返回 null
// medicalBox
var allObjects = FindObjectsOfType<GameObject>(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 已显示");
}
}