From c3d1efbe2c2479a5ec133a37d0c7e4c703e59ac3 Mon Sep 17 00:00:00 2001 From: yangbear Date: Wed, 1 Jul 2026 22:12:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4Start()=E4=B8=AD=5FbgA?= =?UTF-8?q?udioSource=E5=88=9D=E5=A7=8B=E5=8C=96+=E4=BF=AE=E5=A4=8DPlayExp?= =?UTF-8?q?erimentBg=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/PageController.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Assets/Scripts/UI/PageController.cs b/Assets/Scripts/UI/PageController.cs index 5ce117d..03ebc33 100644 --- a/Assets/Scripts/UI/PageController.cs +++ b/Assets/Scripts/UI/PageController.cs @@ -49,13 +49,6 @@ public class PageController : MonoBehaviour { Debug.Log("=== PageController 初始化开始 ==="); - // 背景音乐 AudioSource - var mgr = GameObject.Find("[Managers]"); - if (mgr != null) { _bgAudioSource = mgr.AddComponent(); } - else { _bgAudioSource = gameObject.AddComponent(); } - _bgAudioSource.loop = true; - _bgAudioSource.playOnAwake = false; - _bgAudioSource.spatialBlend = 0f; // 关掉多余AudioListener(只留Main Camera的) var cam2 = GameObject.Find("camera2"); if (cam2 != null) { var al = cam2.GetComponent(); if (al != null) al.enabled = false; } var cam3 = GameObject.Find("camera3"); if (cam3 != null) { var al = cam3.GetComponent(); if (al != null) al.enabled = false; } @@ -274,7 +267,7 @@ public class PageController : MonoBehaviour { Debug.Log("PageController: [ActivateExperimentObjects] 显示实验物件"); - PlayExperimentBg(); + BGMController.PlayExperimentBg(); var allObjects = FindObjectsOfType(true); foreach (var go in allObjects)