- Home /
Plugins using C# DLL Interface
I'm having a problem switching from Mac, PC platform to iOS platform. I have written my C# interface to the plugins (.bundle, .a (iOS)) as DLLs. We do not wish to expose our code as C# scripts.
I set up my folders as such...
Assets/Plugins -> interfaceToPlugin.dll (for Mac using DLLImport("pluginName"))
plugin.bundle
Assets/Plugins/iOS -> interfaceToPlugin.dll (for iOS using DLLImport("_Internal"))
plugin.a
The "interfaceToPlugin" dlls were compiled separately for Mac and iOS.
I can build and run the Mac version. However, when I switch platforms to build for iOS. The Mac version of interfaceToPlugin.dll is still being referenced and I get pinvoke errors on the plugin methods.
All the Unity documentation explains how to build plugins with the interface to the plugins being C# scripts and the compiler directives will take care of DLLImporting method setups.
I know I cannot be the only one writing the C# interface to the plugins as a dll. The Unity documentation mentions that some developers might do this for the very reason that I am, not to expose our proprietary code.
How can I set up the project environment so that the appropriate interface dlls for the different platforms is used?
Please do not post comment as answer. This has been converted to comment from your answer. With due respect, kindly take a note of the same and refrain from posting comments as answer from next time.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
AndroidJavaObject that ships with c# API 0 Answers
Managed Plugin Can't Reference Unity Plugins 0 Answers
Passing audio information from unity to third-party 0 Answers