Using a DLL assembly on Mac


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 :slight_smile:

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.

The answer is - gladly - “yes”. A simple DLL assembly (not a plugin) works both on Windows than on Mac.