AudioManager は BGM、SFX、フェード、ミュート、空間音声を管理します。SoundManager の後継です。
AudioManager
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);
BgmVolume
SfxVolume
PlayBgm
StopBgm
SetBgmVolume
MuteBgm
MuteSfx
MuteAll
PlaySfx
PlaySfxAt
SFX は 8 チャンネルのプールを使い、空きがなければラウンドロビンで最古のチャンネルを再利用します。プールはシーン遷移後も保持されます。