BroAudio
Quick StartScripting APIAsset Store
  • Overview
    • Introduction
    • Getting Started
    • Compatibility
  • Core Features
    • Library Manager
      • Create The Library
      • Design The Sound
        • 🔊Volume
        • 🎚️Fading
        • 🔁Looping
        • 🎲Randomization
        • 💪Velocity
        • 🎛️Spatial & Mix
    • Audio Player
      • Music Player
      • Dominator Player
    • Playback Group
    • Audio Effect
    • No-Code Components
      • Sound Source
      • Sound Volume
      • Spectrum Analyzer
    • Addressables
    • Customization
  • Designs
    • Audio Mixer
  • Tools
    • Audio Clip Editor
    • Audio Effect Editor
    • Useful Attrubutes
  • Reference
    • Scripting API
      • Class
        • BroAudio
        • SoundSource
        • BroAdvice
      • Interface
        • IAudioPlayer
        • IMusicPlayer
        • IPlayerEffect
        • IAutoResetWaitable
        • IAudioSourceProxy
      • Struct
        • SoundID
        • Effect
        • Fading
      • Enums
        • BroAudioType
        • EffectType
        • StopMode
        • Transition
        • Ease
    • Unity API Integration
    • Audio Terminology
    • Technical Details
  • Others
    • Release Notes
    • Known Issues
      • Duplicate SoundID Issue
    • Roadmap
    • Support & Contact
Powered by GitBook
On this page
  • Introduction
  • How To Use?
  • Marking Entities and Audio Clips as Addressables
  • Reference Conversion
  • Loading the asset
  • Public Methods in BroAudio class
  1. Core Features

Addressables

Last updated 3 months ago

Introduction

is a dynamic asset management solution provided by Unity. It helps determine which audio clips should be loaded, when thet are needed, and how they are loaded.

This documentation covers use Addessables in BroAudio. For further details and the official Addressables manual, please refer to the .

How To Use?

To install Addressables package, please follow the instructions in . Once the package is installed, BroAudio will automatically unlock all addressables related options. No futher configurations needed!

Marking Entities and Audio Clips as Addressables

Addressables requires two things to work:

  1. An asset marked as Addressables.

The first step is pretty straightforward. Just find all the audio clips you plan to use with Addressables and mark them as Addressable in the inspector.

The second step is also simple. Open the LibraryManager, select an entity, and you will see an Addressables checkbox in the upper-right area of the Clips tab. Just check it!

These two steps can actually be done at the same time. You can first add audio clips to an entity and then mark the entity as Addressable. If the entity already contains clips, a Reference Conversion Confirmation window will appear, asking how you want to handle them.

Reference Conversion

One major benefit of using Addressables is that it utilizes indirect references (usually with AssetReference). This means the asset is not loaded immediately when referenced, unlike direct references, helping reduce memory usage at runtime.

The confirmation window provides three options:

[Yes] Converts the current clip list to AssetReference and automatically marks the corresponding audio clip assets as Addressable, so you don't have to mark them manually.

[Yes, don't ask again] Same as [Yes], but remembers your choice so the window won’t appear again..

[No] or close the window No changes are made, and the Addressables checkbox remains as is.

The same confirmation window will also popup when the list is already using AssetReference, but in the opposite way. Clicking [Yes] will convert the clip list to direct references and unmark all corresponding audio clip assets as Addressable.

Other Conversion Settings

You can configure additional options for reference conversion under Tools/BroAudio/Preferences - Miscellaneous.

Always Ask Always show the confirmation window.

Only Convert Convert the list to the target reference type without changing the Addressables state of the clip assets.

Convert And Set Addressables Convert the list and mark/unmark Addressables on the clip assets. This is the default behavior for [Yes] and [Yes, don't ask again]. Plus, [don't ask again] will change the setting to this option while [Yes] remains on Always Ask.

Convert And Clear All References Convert the list and remove all references from it.

Loading the asset

Now that the audio clips are set as Addressables, managing their loading process is up to us.

Method
Return
Parameters
Description

LoadAllAssetsAsync

Loads all the audio clips in the entity

LoadAssetAsync

Loads the first audio clips in the entity

Loads the audio clip in the entity's clip list by index

ReleaseAllAssets

void

Releases all the audio clips in the entity

ReleaseAsset

void

Releases the first audio clips in the entity

void

Releases the audio clip in the entity's clip list by index

An for addressing the asset.

The API functions similarly to Unity’s standard Addressables APIs. You call the loading method, get an , wait for it to complete before using the asset, and release it when it's no longer needed.

Public Methods in class

<IList<AudioClip>>

id

<AudioClip>

id

<AudioClip>

id, int index

id

id

id, int index

AssetReference
AsyncOperationHandle
BroAudio
AsyncOperationHandle
SoundID
AsyncOperationHandle
SoundID
AsyncOperationHandle
SoundID
SoundID
SoundID
SoundID
Addressables
Unity Manual
Unity's manual
Page cover image