OculusSpatializerFMOD path issue on Build Oculus VR

We are using FMOD 2.01.02 - in Unity 2020.1.3

We are having issues with F-MOD DLL Pathing issues. In a build FMOD is unable to find the DLL See the error below.

SystemNotInitializedException: [FMOD] Initialization failed : Loading plugin ‘OculusSpatializerFMOD’ from 'C:/Users/Bester/Desktop/VaultAudioHeadsetTest/Vault of Stars Alpha_Data/PluginsSystemNotInitializedException: [FMOD] Initialization failed : Loading plugin ‘OculusSpatializerFMOD’ from ‘C:/Users/Bester/Desktop/VaultAudioHeadsetTest/Vault of Stars Alpha_Data/Plugins/OculusSpatializerFMOD.dll’ : ERR_FILE_NOTFOUND : File not found.

All Plugins in a build are located in Vault of Stars Alpha_Data/Plugins/ x86_64

Easy fix change the path to:

/x86_64/OculusSpatializerFMOD.dll

However when attempting to run in the editor now:

Users/Bester/Desktop/Vault of Stars Alpha/Assets/Plugins/FMOD/lib/win/X86_64/x86_64/OculusSpatializerFMOD.dll

FMOD then fails to launch in the Editor.

Our work around it to stacking the X86_64 Folder so there is one in each folder.

So were you able to fix it that way? Your issues sound very similar to the ones I had myself. In case this is useful: Oculus Spatializer + Fmod + Unity

Yes, duplicating the DLL and placing it where the build wants it, and also where the editor wants it, does fix the issue. I don’t see a way for me to fix the build path, I think it will need to be addressed by FMOD.

1 Like

Hi, thanks for letting us know about this. The plugin location was changed in Unity 2019, but our code had not been updated to match. This issue has been fixed for the next release.

FMOD 2.01.04 has now been released, including this fix.

That is awesome - thank you!!

It’s broken again on 2.02.09.

Hi,

A couple of things to check.
First is the .dll in the Assets > Plugins > Plugins > FMOD > platforms > win > lib > x84_x64 folder. Secondly, the plugin is added to your FMOD Settings:

Hi Connor. I solved the issue but as I mentioned before it’s all provoked by the Oculus plugin getting installed in the wrong folder by default. The DLL files need to be manually moved to the correct folder after installation.

1 Like

Hi,

Thank you for bringing this to our attention. I was able to reproduce the issue and will pass it on to our development team to look into it further.

Hello! I have this error and I can’t get around it. I have searched everywhere for an answer.

Error in Console:

SystemNotInitializedException: [FMOD] Initialization failed : Loading plugin ‘OculusSpatializerFMOD’ from ‘/Users/**/Unity/Viking Village FMOD TEST/Assets/Plugins/FMOD/lib/mac/OculusSpatializerFMOD.bundle’ : ERR_FILE_NOTFOUND : File not found.

OculusSpatializerFMOD.bundle is located in this path: Assets/Plugins/FMOD/lib/mac/OculusSpatializerFMOD.bundle

So why am I getting this error if it is in the right place.

MOD: 2.02.15 (Unity Verified
Unity: 2021.3.27f1
Oculus Spatializer FMOD 47.0.0
MAC OS Catalina 10.15.7

Many thanks, Brona

Hi,

Thank you for the information. The first thing to check is if the plugin is added to the settings:

I noticed that I had to use the OculusSpatializerFMOD.dll in the "\FMOD\x64\OculusSpatializerFMOD.dll" from the Oculus download ovr_audio_spatializer_fmod_47.0.zip. I then placed that dll into \Assets\Plugins\FMOD\platforms\win\lib\x86_64\. Let me know if that works.

Hey Connor, Hope you are well,

Yes the plugin is added to the settings.
I have also moved all of the plugins into the correct folders within Assets–>Plugins–>FMOD

Would there be another reason it cannot load the plugin?

I am on mac and building for desktop at the moment

Thanks


1 Like

Also when I remove the plugin OculusSpatializerFMOD from the settings in Unity and use the FMOD spatializer instead I get this yellow message in the console:

Plugins: Couldn’t open /Users/bronamartin/Unity/VikingVillageTest_FMOD/Assets/Plugins/FMOD/platforms/mac/lib/OculusSpatializerFMOD.bundle/Contents/MacOS/OculusSpatializerFMOD, error: dlopen(/Users/bronamartin/Unity/VikingVillageTest_FMOD/Assets/Plugins/FMOD/platforms/mac/lib/OculusSpatializerFMOD.bundle/Contents/MacOS/OculusSpatializerFMOD, 2): Library not loaded: @rpath/libthird-party_pffft_pffft.dylib
Referenced from: /Users/bronamartin/Unity/VikingVillageTest_FMOD/Assets/Plugins/FMOD/platforms/mac/lib/OculusSpatializerFMOD.bundle/Contents/MacOS/OculusSpatializerFMOD
Reason: image not found

But the sounds work fine when stop I using the OculusSpatializerFMOD

1 Like

Hi,

Apologies, I overlooked you were working on a Mac.

I managed to solve the issue by using the libOculusSpatializer.dylib rather than the .dunble. Could you please try just importing the libOculusSpatializer.dylib then adding the following to the FMOD Integration Settings:

You may get a warning from Unity about using the .dylib this can be fixed in your System Preferences -> Privacy & Security -> Security and allowing the .dylib to be read.

I have not been able to reproduce this error, can I confirm you removed OculusSpatialixerFMOD from the setting and deleted all the oculus files as well?

Hope this helps!

Hi Connor! Thanks for your reply,
I have tried that and I am still getting errors. I have attached the errors and my FMOD settings.

This is where the trouble starts - Missing DSP plugin ‘Oculus Spatializer’ - So this is the Oculus Spatializer plugin that I use for in FMOD studio. It is located in the Plugins folder of FMOD Studio but not in the assets plugins folder in unity. But I think that is all correct.

When I remove the Oculus Spatializer and replace it Resonance Audio everything works fine.

Thanks, Brona



1 Like

Apologies, I was not very clear.

Could you add the .dylib to your platform folder in the Unity project, the same location where the .bundle was located before:

replace it with the .dylib


The plugin also needs to be located in the Unity assets folder for the FMOD integration to be able to find it. Just a reminder this may prompt a security warning.

Thanks Connor,

So I think that solved one problem - But now I have this error
DllNotFoundException: fmodstudioL

The screenshot attached shows you all of the files in the android-arm84 folder.
fmodstudio.dll is in there. I put it in there

Many thanks,
B

Hi,

Unfortunately, I did not run into this issue.

When is this error being logged? Are you able to provide the full Editor and Player Unity logs that I can have a look at?
You should only require the following files in the android->lib->arm64-v8a folder: