Some unity project want use OpenMesh datastract, to rewrite OpenMesh datastract is almost impossible, so use dll to do that.
open DLL1_visualstudio to modify dll copy dll file to DLLtest_unity to test it.
download openmesh source code.
use cmake to make VisualStudio format file.Configure selelct Visual Studio version(I used Visual Studio 2017) and x64 platform because unity is 64 bytes, and Generate. May have some error just ignore it.
open cmake made VisualStudio project and build it, It will generate two .lib file "OpenMeshCore.lib""OpenMeshTools.lib" in release x64 mode or "OpenMeshCored.lib""OpenMeshToolsd.lib" in debug x64 mode.
create a VisualStudio dll project.
copy two lib file and Openmesh sorce code Foler /src/OpenMesh/core /src/OpenMesh/Tools to VisualStudio dll project and change project setting and add preprocessor define
_CRT_SECURE_NO_WARNINGS
_SCL_SECURE_NO_WARNINGS
_USE_MATH_DEFINES
NOMINMAX
_MBCS
and include them in you dll.h flie like this.
write your owns API from OpenMesh to Unity in visualstudio dll project and build. This will create dll file. a simple function API in dll.h file in dll.c file
create a unity project (I use unity2018.4.5.f1) add Plugins folder in Asstes floder and copy dll file to this folder you just create.
create a C# script in unity and you can use dll file to use OpenMesh:D