Oculus AudioPluginOculusSpatializer in Unity 2019.1.11f1 no longer able to integrate

Integrating the Oculus Audio SDK / Spatializer into Unity 2019.1.11f on Windows… tried everything, no combination of packages / files seems to fully work right now. I could be doing something wrong though!

  • You have to install the Oculus integration from the Unity package manager, otherwise the DLL do not show up in the project settings for Spatializer Plugin.
  • Then you have to install the Oculus integration or Audio SDK separately, otherwise you cannot access the required scripts.
  • Basic spatializer functionality works, however If you try to add occlusion that fails, as the mono script cannot access the AudioPluginOculusSpatializer.dll installed from the Unity package manager.
  • Error is on the dllimport which gives a dllnotfoundexception.

Anyone found a way to get this working recently or can point me in the right direction? How can we access / import a DLL that has been loaded via package manager?

// WildStyle

So I was able to get this working:

  • Installed the Oculus integration from the Unity package manager.

  • Installed the Oculus integration from Asset Store.

  • Updated the Spatializer plugin from the Oculus menu.

  • Selected the Oculus Spatializer Plugin in Project Settings > Audio.

  • Restarted Unity.

  • Added the ONSPPropagationGeometry script and it worked.

Other issues to note:

  • ONSPPropagationGeometry throws errors on GameObject’s that have a name longer than 30 characters.

  • If you get an error be sure to reset ONSPPropagationGeometry script before retrying (after shortening file path).

  • When you bake the ONSPPropagationGeometry it adds a ONSPPropagationMaterial script autmatically, unfortunately it does this every time you bake, so edit / fix this in the script.

// WildStyle

2 Likes

Thanks WildStyle69! Step 3 fixed the issue for me.

I had been getting “DllNotFoundException: AudioPluginOculusSpatializer”.
Step 4 - setting Project Settings > Audio to Oculus Spatializer was what I was missing. Apparently without that Unity never copied the DLL into the Build Project.

1 Like

Thank you! In Project Settings > Audio > Spatializer to OculusSpatializer fixed the error for me. Previously, every launch we got:

EXCEPTION: DllNotFoundException: Unable to load DLL 'AudioPluginOculusSpatializer'. Tried the load the following dynamic libraries: Unable to load dynamic library 'AudioPluginOculusSpatializer' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "AudioPluginOculusSpatializer" not foundONSPAudioSource.OSP_SetGlobalVoiceLimit (System.Int32 VoiceLimit) (at <00000000000000000000000000000000>:0)
2 Likes

That fixed it for me too.

What Unity version were you using? I am having the same issue with the version 2020.3.36f1

Can confirm this also fixed the missing dll issue for me in Unity 2022.3.11f1 with Oculus Integration 57.0 from the package manager.