Failed to load NewtonWrapper.dll in Unity 5.5.0f3

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Failed to load NewtonWrapper.dll in Unity 5.5.0f3

Postby nikki » Tue Feb 14, 2017 8:40 am

So I downloaded newton-dynamics and NewtonUnityPlugin and compiled them in Visual Studio 2015 set for release and x64. I opened the demo in Unity 5.5.0f3 and attempted to run it. The result is the error below. Does anyone know what I could be doing wrong? This is my first attempt at compiling and using Newton Dynamics. :)

I have dlls installed as so:
Assets/Editor/NewtonPluginEditor.dll
Assets/Plugins/NewtonPlugin.dll
Assets/Plugins/NewtonWrapper.dll

Code: Select all
Failed to load 'Assets/Plugins/NewtonWrapper.dll' with error 'The specified module could not be found.
'.
dNewtonCollisionBox:.ctor(dNewtonWorld, Single, Single, Single) (at D:/Documents/Unity/NewtonUnityPlugin-master/NewtonPlugin/newton_wrap.cs:1928)
dNewtonCollisionBox:.ctor(dNewtonWorld, Single, Single, Single) (at D:/Documents/Unity/NewtonUnityPlugin-master/NewtonPlugin/newton_wrap.cs:1927)
NewtonBoxCollider:Create(NewtonWorld) (at D:/Documents/Unity/NewtonUnityPlugin-master/NewtonPlugin/NewtonBoxCollider.cs:29)
NewtonCollider:ValidateEditorShape() (at D:/Documents/Unity/NewtonUnityPlugin-master/NewtonPlugin/NewtonCollider.cs:166)
NewtonCollider:OnDrawGizmosSelected() (at D:/Documents/Unity/NewtonUnityPlugin-master/NewtonPlugin/NewtonCollider.cs:52)
UnityEditor.DockArea:OnGUI()


Code: Select all
DllNotFoundException: Assets/Plugins/NewtonWrapper.dll
NewtonWrapperPINVOKE+SWIGExceptionHelper..cctor () (at D:/Documents/Unity/NewtonUnityPlugin-master/NewtonPlugin/newton_wrap.cs:2515)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for SWIGExceptionHelper
NewtonWrapperPINVOKE..cctor () (at D:/Documents/Unity/NewtonUnityPlugin-master/NewtonPlugin/newton_wrap.cs:2535)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for NewtonWrapperPINVOKE
dNewtonWorld..ctor () (at D:/Documents/Unity/NewtonUnityPlugin-master/NewtonPlugin/newton_wrap.cs:1695)
NewtonWorld..ctor () (at D:/Documents/Unity/NewtonUnityPlugin-master/NewtonPlugin/NewtonWorld.cs:151)
UnityEditor.DockArea:OnGUI()
nikki
 
Posts: 3
Joined: Tue Feb 14, 2017 8:15 am

Re: Failed to load NewtonWrapper.dll in Unity 5.5.0f3

Postby Sweenie » Tue Feb 14, 2017 10:12 am

Hmm, odd.

I just tried myself by downloading a fresh copy of the plugin and compiled it.
Worked fine.

Are you running the 64-bit version of Unity?
Does is say Unity 5.5.0f3 (64-bit) in the title?
Just to make sure.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Failed to load NewtonWrapper.dll in Unity 5.5.0f3

Postby Sweenie » Tue Feb 14, 2017 10:33 am

I managed to get the same error if I flag the dll as x86 in the Unity importer.

In the Editor, look under Assets/Plugins/ and click on NewtonWrapper

Verify that the importer settings look like this...

Image

Also, make sure that you really compiled the Plugin as 32-bit.
I suppose you get the same error if it's flagged as 64-bit in the importer but the dll is 32-bit.

Don't forget to restart Unity after changing any importer settings, Unity doesn't reload native dlls.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Failed to load NewtonWrapper.dll in Unity 5.5.0f3

Postby nikki » Tue Feb 14, 2017 10:47 am

Thanks for confirming it's compiling and running without issue. That's gives me confidence.

I have the same import settings, but it's not working for me. I've just now downloaded Unity 5.5.1f 64bit. I'll delete the newton install, unzip again and compile from afresh and retest.
nikki
 
Posts: 3
Joined: Tue Feb 14, 2017 8:15 am

Re: Failed to load NewtonWrapper.dll in Unity 5.5.0f3

Postby nikki » Tue Feb 14, 2017 12:51 pm

Serves me right for tinkering with too many compile options. :cry: But it just compiled and ran from a fresh install changing minimum necessary! 8) Now for some real tight joints! Thank you!
nikki
 
Posts: 3
Joined: Tue Feb 14, 2017 8:15 am

Re: Failed to load NewtonWrapper.dll in Unity 5.5.0f3

Postby Sweenie » Tue Feb 14, 2017 12:54 pm

Awesome :D
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Failed to load NewtonWrapper.dll in Unity 5.5.0f3

Postby Julio Jerez » Tue Feb 14, 2017 1:20 pm

nikki wrote: Now for some real tight joints! Thank you!


please let us know what you think, and if you have any suggestion for improvement.
also bare in mind it is still work in progress.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 18 guests

cron