Can I reload bank in runtime mode?


#1

UE4 : 4.21
FMOD : 1.10.10

I’m working on a mobile game, and making patch system.

I want to have some bank at startup. and download additional & updated banks after game starts.

I tried :

	LoadBanks( EFMODSystemContext::Runtime );

This code loads new downloaded banks, but not working on exsiting banks.
And tried like FFMODStudioModule::HandleBanksUpdated :

	DestroyStudioSystem( EFMODSystemContext::Runtime );
	CreateStudioSystem( EFMODSystemContext::Runtime );

	LoadBanks( EFMODSystemContext::Runtime );

This code crashes after level changes.

Can I unload existing banks and reload a new set?

Thanks.


#2

There isn’t a wrapper function made for this purpose, although you should be able to find a way to do this with the FMOD API.

You can use Studio::System::unloadAll to unload all the currently loaded banks, then possibly LoadBanks( EFMODSystemContext::Runtime ); although I cannot say that I have tried that before. Otherwise you could create a function that loads/unloads specific banks at runtime.