Skip to main content
Up and Coming
February 16, 2015

Unity 5 Beta Integration

I have just upgraded to Unity 5 Beta and followed the common advice on dealing with compiler errors; e.g. removing x86 folder, etc... but I am left with a persistent error message as follows, despite having the right dll in my Plugins/x86_64 folder, called OculusPlugin.dll

Failed to load 'Assets/Plugins/x86_64/OculusPlugin.dll' with error 'The specified module could not be found.
', GetDllDirectory returned ''. If GetDllDirectory returned non empty path, check that you're using SetDirectoryDll correctly.

Does anyone know why this persists? I have tried installing the Microsoft Visual C++ 2010 Redistributable Package (x64) etc...
    This topic has been closed for replies.

    14 replies

    Up and Coming
    February 16, 2015
    i7 skylake, EVGA Classified, 2 EVGA 980 sc's, Thermaltake TR2 RX(1000W), 32GB DDR4, Win 10 on an SSD
    hmiriAuthor
    Up and Coming
    February 17, 2015
    Thanks pittsburghjoe, but this doesn't address my questions about MVS 2010 or dll messages, or are you referring to something else that I am missing?
    Up and Coming
    February 17, 2015
    People seam to have better luck doing a clean install of 5 instead of upgrade.

    I assume you looked that this thread also for possible fixes: http://www.reddit.com/r/oculus/comments/2voutq/unity_5_beta_rift_development/

    I don't know, I hope someone more knowledgeable can chime in here.
    i7 skylake, EVGA Classified, 2 EVGA 980 sc's, Thermaltake TR2 RX(1000W), 32GB DDR4, Win 10 on an SSD
    hmiriAuthor
    Up and Coming
    February 17, 2015
    That is a good point.

    I should have mentioned that what I did was to install Unity 5 Beta Pro separately, so I suppose it was a clean install! Right?

    My Unity 4.6.2 is now in the Program Files (x86) folder and unused, but my Unity 5 is in the Program Files folder.

    What baffles me is that when I switch the Rift off (or on, depending on what state it is in) the many error messages go away.

    The 3 attached screenshots show the state of my folders (I removed x86) and their Editor Settings when I click on the dll file.

    Now, it is working, but when I launch the Unity 5 Editor fresh, I get a deluge of error messages, including the following:

    Failed to load 'Assets/Plugins/OculusPlugin.dll'
    DllNotFoundException oculusplugin.dll
    ...
    ...
    ...

    Again, when I do a turn on/off, it works and then launching again, I get the err msg...

    What would you recommend for the settings in my attached pics?

    Thanks

    Plugins.PNG

    Editor1.PNG

    Editor2.PNG
    Up and Coming
    February 17, 2015
    Hi hmiri, as far as i can see on those screenshots, you have made some mistakes!

    You should not delete the x86 folder for the oculus plugin! you may need to re-import the entire Oculus SDK in order to fix this issue!

    The reason why it's there in the first place is in order to let the developer choose between the old x86 builds and x64 builds to "future proof" their games :) please also, if you've made it Work then please reply in here and mark your problem as solved, as it may help others :)

    Try it out and come back when you have done so ;)

    Edit! i mean you may need to reimport the entire oculus plugin folder from the SDK ;) because as i've forgot to mention you shouldn't put the x86/x64 plugin into the plugin folder directly but instead use the appropriate folders they were originally imported with :)
    ASUS Maximus VII Formula Intel core i7 quad core 4790K OC'ed @ 4.4Ghz 32GB DDR3 Ram Nvidia Geforce GTX 980 4GB Windows 10 Pro 64bit GSync Monitor @ 2560x1440, 144Hz ------------------------------------------- DK2 Owner CV1 Preordered.
    hmiriAuthor
    Up and Coming
    February 19, 2015
    Hi standtall007

    Thanks for your detailed reply.

    I had no choice but to remove it, as I was getting many error messages, complaining about duplicate DLL files.

    Given that now I think you are absolutely right, I suspect something else might have resolved my issue, and not deleting the "x86" folder...

    cybereality advised that the only DLLs should be in the "x86_64" folder, which I have now ensured.

    I still wonder though if (upon clicking on the DLL file) the CPU option should be set to Any or specifically x86_64?
    Up and Coming
    February 21, 2015
    Hi hmiri, you should set the OculusPlugin.dll in the x86_64 folder to :

    CPU : X86_64
    OS : Any OS

    and under Windows check x86_64
    Hope this helps :)

    this is for the 64bit dll btw ;)
    ASUS Maximus VII Formula Intel core i7 quad core 4790K OC'ed @ 4.4Ghz 32GB DDR3 Ram Nvidia Geforce GTX 980 4GB Windows 10 Pro 64bit GSync Monitor @ 2560x1440, 144Hz ------------------------------------------- DK2 Owner CV1 Preordered.
    Up and Coming
    February 24, 2015
    This thread saved me. After I got rid of the error messages I had to take an additional step to get the Oculus integration to work. I had to delete all of the OVR files (including the ones in plugins) and then reimport the 0.4.4 package. Before that I was just getting a black screen.
    Up and Coming
    March 1, 2015
    "standtall007" wrote:
    Hi hmiri, you should set the OculusPlugin.dll in the x86_64 folder to :

    CPU : X86_64
    OS : Any OS

    and under Windows check x86_64
    Hope this helps :)

    this is for the 64bit dll btw ;)


    When using the mobile version, you also have to go into the meta file and manually change a few that are marked x86 but don't change via the GUI. It doesn't sound like that is needed for the standard SDK, but if you run into plugin collision errors, that is something to check.
    hmiriAuthor
    Up and Coming
    March 1, 2015
    Thank you standtall007 and roswell108 ...

    @roswell108: When you say "but don't change via the GUI" do you mean through file explorer? Also, do you mean renaming the x86 ones or removing them?

    Cheers