zillemarco / CppPlugGen

Created CppPlugGen to genereate CppPlug bindings
1 stars 0 forks source link

Create a native plugin for Unity3D / Questions #1

Open roscopecoltran opened 7 years ago

roscopecoltran commented 7 years ago

Hi,

Hope you are all well !

I wanted to test your interesting work to extend its use to build and automate writing of unity native plugins. (article about how to write native plugins for unity: http://www.alanzucconi.com/2015/10/11/how-to-write-native-plugins-for-unity/), and have some questions about CppPlugGen, CppPlug integration in a wider CMake external projects processing.

Context:

I wanted to create a native plugin from this repo, dlib, but the api is large and wanted to focus only to export this example, link, in Unity3D, and use its web-camera supports to test some facial recognition features.

After a couple of searches, I found CppSharp and and CppPlug, that I tested and posted a quick issue about the compilation of the project with the managed plugins support.

I wanted to use Hunter, a CMake package manager providing lots of interesting packages, and Polly, a collection of CMake toolchain files and scripts for cross-platform build and CI testing.

hunter:

polly:

Questions

Have a great day and thanks for your input about that by advance !

Richard

zillemarco commented 7 years ago

Hi, thank you for your interest in this project! I'll try to answer to your questions in the best way I can, but first let me explain what I had in mind when I started these projects. CppPlug is a library I started to write to be used inside my company to make one of our products extendible with pulgins written in many different languages. C and C++ were easy, but we wanted to give our developers and customers the possibility to use higher level languages. Looking for a solution I found out that using the Mono library, a lot of such languages come almost free (C#, Python and JavaScript due to their C# bindings IronPython and IronJS, etc.), so I started looking for a way to automatically build a bridge from C++ to C#. Googling a bit I found CppSharp and started writing CppPlugGen to use CppSharp to build these C++ to C# bridges automatically. After some work the CppSharp guys contacted me to bring my CppPlugGen inside CppSharp itself so I discontinued working on CppSharpGen and worked on CppSharp.CLI which is basically CppPlugGen with a different name.

Now, to actually answer to your questions: