Please help with DLL plugin.

I’m currently testing out the DLL plugin feature of Unity, but haven’t been able to get it working. I plan on building the application for Windows so naturally I’m trying to use a DLL. If anyone can shed some light on how the plugin system work, I’d greatly appreciate it.

Ok, first here’s the code for my DLL built with Visual Studio 2005:

Here’s the code I used in Unity. I attached it to a GUIText object:

I built the application and ran it in Windows. All I’m getting is the “Start Test”. I never see the “End Test”. It appears to be stuck at the function call to the DLL.

Looks like I found the problem. It appears that Unity places the DLL file inside the /Data/Plugins folder, but the executable is looking for the DLL in the same directory as itself. It was getting stuck since it was unable to locate the DLL. After I copied the DLL out to the root with the executable, it found the DLL and everything worked.