Hi, I’m trying to load my banks from code and get information about them. I’m using Unity 2022.3.20f1 with fmod studio 2.02.24.
I have a VCA set up from the studio and when I try to get it I just get the error ERR_EVENT_NOTFOUND
. So I thought I’d read the bank file to check if it’s even in there but it’s not human readable.
The next approach would be to get the loaded bank and then use getVCAList() on it. This seems to work but vca.getPath()
returns null. Also ERR_EVENT_NOTFOUND
.
My integration is the same as StudioBankLoader
which is basically:
[SerializeField] [FMODUnity.BankRef] private string _bank;
void Start() {
FMODUnity.RuntimeManager.LoadBank(_bank);
FMODUnity.RuntimeManager.WaitForAllSampleLoading(); // the bank loads succesfully
var bankListResult = FMODUnity.RuntimeManager.StudioSystem.getBankList(out var bankArray); // This works fine
if (bankListResult != FMOD.RESULT.OK) Log.Error("Couldn't get bank list from StudioSystem: " + bankListResult);
foreach (var bank in bankArray) {
var bankPathResult = bank.getPath(out var path); // path is null and result is the event not found error, but the bank does exist
if (bankPathResult != FMOD.RESULT.OK) Log.Error("Couldn't get bank path: " + path + ". Err: " + bankPathResult);
var bankVcaListResult = bank.getVCAList(out var vcaList); // this one is fine too
if (bankVcaListResult != FMOD.RESULT.OK) Log.Error("Couldn't get vca list from bank: " + bank + ". Err: " + bankVcaListResult);
foreach (var vca in vcaList) {
var vcaPathResult = vca.getPath(out string vcaPath); // again this path is null and returns the event not found error, but it exists in the list...
if (vcaPathResult != FMOD.RESULT.OK) Log.Error("Coulnd't get vca path: " + vcaPath + ". Err: " + vcaPathResult);
Log.Info("VCA: " + vcaPath);
}
}
}
Maybe worth noting: I’m using perforce as version control, I have a feeling that the readonly files might be a cause. I also assume that getPath returns something like vca:/MyVCA
If anyone has any ideas on why getPath()
is failing I’d really appreciate it. Or if there are other ways to read the bank data or load them I’d also love to hear about it.