From ed1f4deeff38d54424ebf583f5d095b09a3b6fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Serra=20Trujillo?= Date: Fri, 17 May 2024 02:31:23 +0200 Subject: [PATCH] Stopped audio from level one when you go back to main menu --- TheOneScripting/UiScriptPause.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/TheOneScripting/UiScriptPause.cs b/TheOneScripting/UiScriptPause.cs index 6820cb73..e026cb86 100644 --- a/TheOneScripting/UiScriptPause.cs +++ b/TheOneScripting/UiScriptPause.cs @@ -140,14 +140,7 @@ public override void Update() if ((Input.GetControllerButton(Input.ControllerButtonCode.X) || Input.GetKeyboardButton(Input.KeyboardCode.RETURN)) && canvas.GetSelectedButton() == 4) { attachedGameObject.source.Play(IAudioSource.AudioEvent.UI_CLICK); - //if (playerGO.source.currentID == IAudioSource.AudioEvent.A_COMBAT_1) - //{ - // playerGO.source.Stop(IAudioSource.AudioEvent.A_COMBAT_1); - //} - //if (playerGO.source.currentID == IAudioSource.Events.A_AMBIENT_1) - //{ - // playerGO.source.Stop(IAudioSource.Events.A_AMBIENT_1); - //} + playerGO.source.Play(IAudioSource.AudioEvent.STOPMUSIC); SceneManager.LoadScene("MainMenu"); }