My apologies I missed that, to use Addressables follow this example:
-
We need to ensure we have defined
UNITY_ADDRESSABLES_EXISTin the player settings. This can be found under Unity Toolbar → Edit → Project Settings → Player → Other Settings → Script Compilation. You may get some errors in the console but that is fine, they will be solved in the next step.
-
Import the
Addressable Packagefrom the UnityAsset Manager Windowunder Unity Toolbar → Window → Package Manager → Unity Registry → Addressables.
- Assign the FMOD
Text AssetstoAddressables, you can do this by selecting them in yourProject Directoyand ticking theAddressabletick box
- The
Addressableswill want to be loaded into memory `Asyn - Now the
Addressablesare ready to be loaded into memory. Create a new script namedLoadAllBanksand then copy the following example into that script. You can change the name if you like.
LoadAllBanks class
Using UnityEngine;
using System;
using System.Collections.Generic;
using UnityEngine.AddressableAssets;
using System.Collections;
using UnityEngine.SceneManagement;
public class LoadAllBanks : MonoBehaviour
{
public List<AssetReference> Banks = new List<AssetReference>();
public string Scene;
private static int numberOfCompletedCallbacks;
void Awake()
{
StartCoroutine(LoadBanksAsync());
}
private Action Callback = () =>
{
numberOfCompletedCallbacks++;
};
IEnumerator LoadBanksAsync()
{
Banks.ForEach(b => FMODUnity.RuntimeManager.LoadBank(b, true, Callback));
while (numberOfCompletedCallbacks < Banks.Count)
yield return null;
while (FMODUnity.RuntimeManager.AnySampleDataLoading())
yield return null;
AsyncOperation async = SceneManager.LoadSceneAsync(Scene);
while (!async.isDone)
{
yield return null;
}
Banks.ForEach(b => b.ReleaseAsset());
}
}
-
In the Inspector window of an object with your script, add the
banksyou wish to load

-
Loading Unity assets are an Asynchronous operation, further explanation can be found in Unity | Getting started with Addressable Assets, so we will need an empty
sceneto load thebanksthen a populatedsceneto play them in. So in your UnityBuild Settingsyou will want to have something like this:

In theEmptySceneis our object that loads ourbanks, then we transition to theMusicScenewhere we will hear our events. -
Make sure to start the project in the
EmptyScenetoLoadBanks, now all the assignedbanksshould be loaded
Sorry about the confusion, I hope this helps!


