- Home /
UnitySetGraphics not called in native plugin
I am trying to run the sample native plugin from http://docs.unity3d.com/Manual/NativePluginInterface.html in Windows x86, but Unity is not calling my UnitySetGraphics
or UnityRenderEvent
functions. I have tried changing the method signature to __UnitySetGraphicsDevice__
and __UnityRenderEvent__
but nothing changed.
I checked whether the functions were called by setting breakpoints in Visual Studio and attaching the debugger to Unity. SetTimeFromUnity
is being called every frame.
I am using Visual Studio 2013, building x86.
Here is the dll in Dependancy Walker:
Notice no name mangling.
Edit: Tried Visual Studio 2008 with no success.
I'm having the exact same problem, see my question here: http://answers.unity3d.com/questions/746238/low-level-native-plugins-not-working-in-43-on-wind.html
It magically started working one day, but after making changes to the .dll name it is now broken again. I don't know what (if anything) I did before to get it working.
Answer by teddytrowbridge · Aug 12, 2014 at 06:56 PM
I've run into this problem twice now and this appears to have been what fixed it for me:
Close Unity
Delete
\Library\metadata\
Delete everything in
\Assets\Plugins\
and then place your .dll in itRestart Unity and let it reload the metadata
It magically started working a few days ago, and I assume this is why. Thanks!
Your answer
