Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Oculus AudioPluginOculusSpatializer in Unity 2019.1.11f1 no longer able to integrate

Discussion in 'Package Manager' started by WildStyle69, Jul 22, 2019.

  1. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    317
    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
     
    Last edited: Jul 23, 2019
  2. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    317
    So I was able to get this working:
    1. Installed the Oculus integration from the Unity package manager.
    2. Installed the Oculus integration from Asset Store.
    3. Updated the Spatializer plugin from the Oculus menu.
    4. Selected the Oculus Spatializer Plugin in Project Settings > Audio.
    5. Restarted Unity.
    6. 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
     
    xtr33me likes this.
  3. xtr33me

    xtr33me

    Joined:
    Nov 2, 2011
    Posts:
    90
    Thanks WildStyle69! Step 3 fixed the issue for me.
     
  4. LHAppri

    LHAppri

    Joined:
    Aug 18, 2017
    Posts:
    20
    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.
     
  5. larryPlayablStudios

    larryPlayablStudios

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

    Code (CSharp):
    1. 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)
     
    AldeRoberge likes this.
  6. EricJ13

    EricJ13

    Joined:
    Feb 28, 2009
    Posts:
    354
    That fixed it for me too.
     
  7. Momissimo

    Momissimo

    Joined:
    Aug 15, 2019
    Posts:
    18
    What Unity version were you using? I am having the same issue with the version 2020.3.36f1
     
  8. Paul-van-der-Laan

    Paul-van-der-Laan

    Joined:
    Oct 12, 2013
    Posts:
    54
    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.