Skip to content

Audio Loader

Indigocoder1 edited this page Oct 23, 2024 · 2 revisions

Audio Loader

Sub Library comes with a component called the SubAudioLoader, which, as you might guess, has a list of FMODAssets so that they can be included in your asset bundle.

Note that this component is not added to your prefab root by the AddSubScripts component, so you will need to add this one yourself.

However, it's main purpose is the method it has called LoadAllAudio, which takes an AssetBundle. This searches the given asset bundle for all CustomFMODAssets, and automatically loads them for you, letting you not have to deal with manually registering each audio file.

Simply call this method from your plugin class, pass in your asset bundle, and all your custom fmod assets will be loaded.