For AI agents: the complete documentation index is available at /AchEngine/ja/llms.txt, the full documentation bundle is available at /AchEngine/ja/llms-full.txt, and this page is available as Markdown at /AchEngine/ja/usage/managers/audio.md.

AudioManager

AudioManager は BGM、SFX、フェード、ミュート、空間音声を管理します。SoundManager の後継です。

builder.Register<AudioManager>();
var audio = ServiceLocator.Resolve<AudioManager>();
audio.PlayBgm(lobbyBgmClip, fadeDuration: 1f);
audio.PlaySfx(buttonClickClip);
audio.PlaySfxAt(explosionClip, explosionObject.transform.position);
audio.MuteAll(false);
API説明
BgmVolume / SfxVolume0〜1 の音量
PlayBgm / StopBgmBGM 再生・停止、フェード対応
SetBgmVolume指定時間で音量変更
MuteBgm / MuteSfx / MuteAll出力のみミュートし、保存音量は保持
PlaySfx2D 効果音
PlaySfxAtワールド座標で 3D 効果音

SFX は 8 チャンネルのプールを使い、空きがなければラウンドロビンで最古のチャンネルを再利用します。プールはシーン遷移後も保持されます。