I can confirm the fix for this is in the upcoming release 2.02.23.
Hello.
I’m hitting the same initialization errors, leading to banks not being copied to the StreamingAssets folder. Using FMOD 2.03.04 and Unity 2022.3.40.
The build process is invoked in batch mode by a Jenkins instance running on a Windows 10 machine. Jenkins is started as a Windows service using a regular user account.
Replacing the code in EditorUtils.CreateSystem()
as instructed above didn’t yield any result.
I managed to work around the issue by adding a Jenkins step that copies the banks before invoking Unity and adding the FMODStudioCache asset to version control (which was previously ignored according to the documentation recommendations).
Are you able to share the full output log containing the errors you are getting?
Sure, here’s a log from a build before I implemented my workaround.
Password is S6njsHEBgo
(I can’t attach files to the post since I’m considered a new user)
Apologies for the delay, I believe this is actually more related to batch mode as it appears to be calling into the editor code of the plugin, which then wants to use the editor FMODSystem to recreate the cache assets.
https://www.fmod.com/docs/2.03/unity/user-guide.html#building-assetbundles
Hello, same apologies here.
FMOD is not configured to load from Asset Bundles but from the StreamingAssets folder.
The documentation you linked says to call theEventManager.CopyToStreamingAssets()
method before building but if you look at the log I provided it’s called during the build. Furthermore, this method relies on the cache being properly populated, but it is its initialization/refresh that causes the errors (they appear in the log before the call to CopyToStreamingAssets()
)