I posted a question in the general forum about how to add C++ plugins to the Unity engine. Was directed here and this looks pretty straight forward.
http://unity3d.com/support/resources/example-projects/texture-plugins
Follow up question. Is this also the case for iPhone. Obviously, if possible, it would have to be a .bundle not a .dll, but is this functionality available in iPhone deployment?
Thanks,
Tharyn
Yes, plugins work for iPhone deployed games.
You don’t use a bundle, you just link the function in at build time (either add it in a compiled source file to, or link an object file you’ve already made).
Could you please explain, in further detail. I under stood the method for adding functions as creating a dll or manifest then calling it in C#.
How does this differ?
-
The functions are defined in .mm files and must be “extern c” functions
-
on the C# side, only one part changes and that is that you specify “__Internal” instead of the function name in DLLImport(…)
you can not talk to bundles or alike.
aside of that its comparabile, still interop services etc
Last link on this page is the “Native Code” example for Unity iPhone: