Search Unity

Unity 5 Personal - Can we use Dlls?

Discussion in 'Scripting' started by AurekSkyclimber, Mar 4, 2015.

  1. AurekSkyclimber

    AurekSkyclimber

    Joined:
    May 12, 2014
    Posts:
    2
    In Unity 4.6 and earlier, it was required to have the Pro version of the editor in order to use Dlls in development. This was critical for utilizing outside software or hardware. According to the Engine Overview for 5, "Native Code Plugin Support" is included as a feature, but it isn't specified if it is a pro or personal feature.

    I've attempted to test if Dlls are available for use with Unity personal with the Sixense Hydra plugin. This was confirmed working with Unity 4.6. Attempts to run the demo Scene bring up the error - Failed to load 'Assets/Plugins/x86_64/sixense.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. Searching for similar problems online have only led to instructions to manually set the dll type from "all" to "standalone" and "editor" with the version checkbox set to x86 and x86_x64 for the respective dll varieties. This did not work...

    As I can't be sure if the problem is just the Sixense Hydra plugin not working with Unity 5, can anyone check to see if they can get some other Dll functional with the personal version of Unity 5? I'm curious to see if the feature is free or not. (Any help with the Sixense Plugin on 5 would be appreciated as well. ^^)
     
  2. essetesse

    essetesse

    Joined:
    Mar 4, 2015
    Posts:
    1
    Hey what's up I'm having the same problem. Upgraded to Unity 5 and my Sixense plugin stopped working, same error message. Everything I read online implies that pro has same features as personal, and for me render to texture (which I'm pretty sure was pro-only on 4.x) works just fine.

    If you find a solution for Unity 5 and Sixense lmk. I'm down to help out writing something, anyone torn their mac SDK open before? (http://sixense.com/macsdkdownload)
     
  3. khubner

    khubner

    Joined:
    Jan 7, 2014
    Posts:
    4
    Hi, I experienced the same problem with the sixense package in my Unity4 project that I upgraded today.

    After creating a clean Unity5 project and getting the Sixense package from the asset store - everything worked out nicely (having the libraries in the Plugins/x86 and Plugins/x86_64 folders - even in the free version).

    I figured that in my own project, I still had errors about sixense-dll and other plugins.
    Only disabling other plugins made the sixense error disappear, and Hydra works perfectly.
    So my guess is that maybe also for you some other libraries get into trouble and let the sixense.dll flag errors.
     
  4. Tiles

    Tiles

    Joined:
    Feb 5, 2010
    Posts:
    2,481
    I guess it's because the new standard editor is 64 bit, and the dll is 32 bit. There's also a 32 bit editor version of Unity available.
     
  5. AurekSkyclimber

    AurekSkyclimber

    Joined:
    May 12, 2014
    Posts:
    2
    I've done a fresh install of Unity 5 (both 64 and 32 bit versions). I've created clean Unity 5 projects and redownloaded the Sixense package. Still no luck.

    The resource provides both a 64 bit and a 32 bit version of the dll, and they are different files with different sizes.

    Is there any chance you could clarify which plugins you disabled? As far as I know there are no other plugins attached to a new project.
     
  6. khubner

    khubner

    Joined:
    Jan 7, 2014
    Posts:
    4
    I disabled plugins (LeapMotion, for example) in my own project (in which I had the same error described here) to make that one work. But since you said you tried a fresh install with fresh Sixense package, and it did not work out, I don't know what could be wrong.

    Some things I noticed was:
    - not closing Unity, but just opening the fresh project (having my own project opened before) seemed to mess up the libraries (I got the same error in the fresh project, but with my own projects's dll path in the error message). I guessed this to be related to that native plugins are never unloaded (you can see this information in the Inspector when you select your dll in the project view).
    - when starting Unity5, where you can now select which project to open, the fresh project showed a "5.0.0" to the right side from the beginning. My own did not - until around the same time the dll problem was fixed. Unfortunately I don't know what this is dependent on (since I upgraded my project the first time it was opened with Unity5).

    Btw: I am only using the 64bit version of Unity5.
     
  7. kleanthis

    kleanthis

    Joined:
    Nov 24, 2013
    Posts:
    2
    Hello

    I have the same problem here. Did anybody found a solution?
     
  8. vladk

    vladk

    Joined:
    Jul 10, 2008
    Posts:
    167
    Same problem. Any solution so far?
     
  9. msue

    msue

    Joined:
    Jun 10, 2015
    Posts:
    6
    I believe to have run into the same problem. Using http://dependencywalker.com/ I found the VC++ 2013 (64bit) runtime was the cause. The runtime is not required by Unity (5.0.2) but by sixense.dll.

    Elsewhere it was mentioned that for the 64bit runtime to work one nonetheless has to install both the 32 and 64 bit redistributable packages from Microsoft. Doing that resolved the problem for me.
     
  10. iko79

    iko79

    Joined:
    Jan 21, 2013
    Posts:
    45
    Same here with custum native plugin. Version 5.2.3 Any solution yet?
     
  11. KyleStank

    KyleStank

    Joined:
    Feb 9, 2014
    Posts:
    204
    I don't know if this will help, but make sure you guys all have Visual Studio 2015. I had 2013, and my plugin didn't work, even if I added a reference through Visual Studio. But when I got 2015, it worked fine. This might not solve your problem, but it won't hurt to try if you haven't already.
     
  12. iko79

    iko79

    Joined:
    Jan 21, 2013
    Posts:
    45
    Thanks for your reply. I got VS2015 and it worked before. so the behaviour was kinda strange...

    Cause here was that I had a DllMain function defined (but not in use) in my dll code, which apparently prevented Unity from loading the dll.