From 8c48af685bf6c5d335d0d3a82d9fc3f1d6546071 Mon Sep 17 00:00:00 2001 From: Ding Yuntian <1491671119@qq.com> Date: Mon, 9 Mar 2026 13:05:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(audio-kit):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=9F=B3=E9=87=8F=E6=BB=91=E5=9D=97=E4=BD=BF=E7=94=A8=E5=AF=B9?= =?UTF-8?q?=E6=95=B0=E6=9B=B2=E7=BA=BF=E5=8C=B9=E9=85=8D=E4=BA=BA=E8=80=B3?= =?UTF-8?q?=E5=90=AC=E8=A7=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/Framework/AudioKit/AudioManager.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Framework/AudioKit/AudioManager.cs b/Assets/Scripts/Framework/AudioKit/AudioManager.cs index 15884d217..6ecd0dc5f 100644 --- a/Assets/Scripts/Framework/AudioKit/AudioManager.cs +++ b/Assets/Scripts/Framework/AudioKit/AudioManager.cs @@ -16,6 +16,13 @@ namespace AibisDream.Kit private const string AmbStateName = "scene"; public EventReference ambEvent; + + [Header("Volume Settings")] + [Tooltip("Minimum volume in dB when slider is at 0")] + [SerializeField] private float minDecibels = -60f; + + [Tooltip("Maximum volume in dB when slider is at 1")] + [SerializeField] private float maxDecibels = 0f; #region Event实例 @@ -149,7 +156,6 @@ namespace AibisDream.Kit private void OnGameQuit() { - ChangeAmb(AmbState.Main); // 清除当前播放的所有东西 foreach (var music in _musicDict.Values) { @@ -316,10 +322,15 @@ namespace AibisDream.Kit #region 调整音量 - public void SetVolume(float volumeValue) + public void SetVolume(float normalizedVolume) { + // 将 0~1 映射到 minDecibels ~ maxDecibels,再转换为线性幅度 + // 使用对数曲线匹配人耳听觉特性 + float db = Mathf.Lerp(minDecibels, maxDecibels, normalizedVolume); + float linearVolume = Mathf.Pow(10f, db / 20f); + var masterVca = RuntimeManager.GetBus("bus:/"); - masterVca.setVolume(volumeValue); + masterVca.setVolume(linearVolume); } #endregion From 3d027814873b1ff625983184758d6bc7834a842b Mon Sep 17 00:00:00 2001 From: Ding Yuntian <1491671119@qq.com> Date: Mon, 9 Mar 2026 13:05:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?scene:=20=E9=85=8D=E7=BD=AE=20Persistence?= =?UTF-8?q?=20=E5=9C=BA=E6=99=AF=E9=9F=B3=E9=87=8F=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/Persistence.unity | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Scenes/Persistence.unity b/Assets/Scenes/Persistence.unity index 6cc9b97bd..781adf282 100644 --- a/Assets/Scenes/Persistence.unity +++ b/Assets/Scenes/Persistence.unity @@ -6927,6 +6927,8 @@ MonoBehaviour: Data3: 1610383794 Data4: -1468709119 Path: event:/Amb/amb + minDecibels: -40 + maxDecibels: 0 --- !u!1 &381795661 GameObject: m_ObjectHideFlags: 0 @@ -9709,7 +9711,7 @@ Transform: m_GameObject: {fileID: 519420028} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.009999275, y: 0, z: -10} + m_LocalPosition: {x: 0, y: 0, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] From 18772bda935e9bf2c10bf4c9144de63014a1828a Mon Sep 17 00:00:00 2001 From: Ding Yuntian <1491671119@qq.com> Date: Mon, 9 Mar 2026 13:06:05 +0800 Subject: [PATCH 3/3] =?UTF-8?q?style:=20=E7=A7=BB=E9=99=A4=20OutsideCenter?= =?UTF-8?q?=20=E4=B8=AD=E7=9A=84=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/SceneManagement/SceneCenter/OutsideCenter.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Assets/Scripts/SceneManagement/SceneCenter/OutsideCenter.cs b/Assets/Scripts/SceneManagement/SceneCenter/OutsideCenter.cs index e33a8df91..953cb06d5 100644 --- a/Assets/Scripts/SceneManagement/SceneCenter/OutsideCenter.cs +++ b/Assets/Scripts/SceneManagement/SceneCenter/OutsideCenter.cs @@ -1,4 +1,4 @@ -using AibisDream.Kit; +using AibisDream.Kit; using UnityEngine; using UnityEngine.Playables; using System.Collections; @@ -13,8 +13,6 @@ namespace AibisDream public override void OnSingletonInit() { // 加载气泡 - Debug.Log("OutsideCenter: LoadBubbles"); - Debug.Log("OutsideCenter: " + bubbleSlotGroup.CollectData().dialogViewType); DialogUIManager.Instance.LoadBubbles(bubbleSlotGroup.CollectData()); }