Bluetooth Framework often used with Unity.
There is some known issue when you use Bluetooth Framework .NET edition: the Unity editor freezes on "Mono Cleanup" message when editor is closing. The issue related to Mono itself and for now there is no solution.
To prevent this we created some "wrappers" that can be used with C++ Edition. You can find it by this link:
https://github.com/btframework/WCL-for-UnityHow to build the "wrapper" DLL:1. Install Bluetooth Framework C++ Edition. better in its default location but actually it does not matter.
2. Find its installation path. By default it is installed in <DOCUMENTS>\WCL\CPP\Bluetooth
3. Open WclGattClientDll solution.
4. Open WclGattClientDll.cpp file in the IDE
5. Change this code lines (at the very beginning of the file)
#include "..\..\..\..\..\WCL7\CPP\Source\Bluetooth\wclBluetooth.h"
#include "..\..\..\..\..\WCL7\CPP\Source\Common\wclErrors.h"
to
#include "<DOCUMENTS>\WCL7\CPP\Source\Bluetooth\wclBluetooth.h"
#include "<DOCUMENTS>\WCL7\CPP\Source\Common\wclErrors.h"
REPLACE <DOCUMENTS> with real path. For example on my PC it is c:\Users\mike\Documents (DO NOT FORGET to change single "\" to double "\\" in the path.
So in my case the changes should look like this:
#include "c:\\Users\\mike\\Documents\WCL7\CPP\Source\Bluetooth\wclBluetooth.h"
#include "c:\\Users\\mike\\Documents\WCL7\CPP\Source\Common\wclErrors.h"
6. Change next code line:
#pragma comment(lib, "..\\..\\..\\..\\..\\WCL7\\CPP\\Lib\\2017\\x64\\wclBluetoothFramework.lib")
to
#pragma comment(lib, "<DOCUMENTS>\\WCL7\\CPP\\Lib\\2017\\x64\\wclBluetoothFramework.lib")
Replace the <DOCUMENTS> as above.
7. Build the project.
8. Copy the DLL into assets folder.
Should you have any questions feel free to contact us at
support@btframework.com