From 6e120233a7a1c98642289c0fe9fca94c17e5dd61 Mon Sep 17 00:00:00 2001 From: "DESKTOP-VVOCIJO\\PC" Date: Mon, 27 Apr 2026 18:02:53 +0900 Subject: [PATCH] =?UTF-8?q?2026-04-27=20=EB=94=94=ED=8F=B4=ED=8A=B8=20?= =?UTF-8?q?=EB=B8=8C=EA=B8=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/02_Scripts/UI/BGMBox.cs | 2 +- Assets/02_Scripts/UI/BGMHud.cs | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Assets/02_Scripts/UI/BGMBox.cs b/Assets/02_Scripts/UI/BGMBox.cs index 84f19b63..f6defd76 100644 --- a/Assets/02_Scripts/UI/BGMBox.cs +++ b/Assets/02_Scripts/UI/BGMBox.cs @@ -3,7 +3,7 @@ public class BGMBox : MonoBehaviour { - [SerializeField] private BGMClip _bgmClip; + public BGMClip _bgmClip; [Header("Refs")] [SerializeField] private TMP_Text _bgmNameField; diff --git a/Assets/02_Scripts/UI/BGMHud.cs b/Assets/02_Scripts/UI/BGMHud.cs index ee368826..cfc05394 100644 --- a/Assets/02_Scripts/UI/BGMHud.cs +++ b/Assets/02_Scripts/UI/BGMHud.cs @@ -7,6 +7,21 @@ public class BGMHud : MonoBehaviour [SerializeField] private GameObject _contentPrefab; private BGMBox currentBgm; + [SerializeField]private BGMClip DefaultBgm; + + public void Start() + { + BGMBox[] BGMBoxs = GetComponentsInChildren(true); + + foreach (BGMBox bgm in BGMBoxs) + { + if(bgm._bgmClip == DefaultBgm) + { + bgm.PlayBGM(); + currentBgm = bgm; + } + } + } public void PlayPickBGM(GameObject buttonObj) {