- Home /
Using a DLL assembly on Mac
Hello,
I'm a Windows user, thus I can't test this directly, and couldn't find an answer online. Will a .dll assembly (not a plugin) work also on Mac versions of Unity, or it has to be re-compiled into something else?
Thanks for any help :)
Answer by Demigiant · Feb 06, 2012 at 09:09 PM
The answer is - gladly - "yes". A simple DLL assembly (not a plugin) works both on Windows than on Mac.
Answer by DaveA · Feb 06, 2012 at 08:54 PM
http://unity3d.com/support/documentation/Manual/Plugins.html:
Building a Plugin for Mac OS X
If you are building a plugin for Mac OS X, you have to create a bundle. The easiest way to do this is using XCode. Use File->NewProject... and select the Bundle - Carbon/Cocoa Loadable Bundle.
If you are using C++ (.cpp) or Objective-C (.mm) to implement the plugin you have to make sure the functions are declared with C linkage to avoid name mangling issues.
Thanks for the answer DaveA, but as I mentioned I was referring to assemblies, not to plugins. Anyway, I found the answer, which is a "yes", but forgot to post it: will do it now :)