cadop / dhart

A library for creating Navigation Graphs, Visibility graphs, Raycasting used in design analysis, architecture, robotics, and human factors.
https://cadop.github.io/dhart/
GNU General Public License v3.0
14 stars 9 forks source link

Unity integration is not supported in Editor #19

Open cadop opened 2 years ago

cadop commented 2 years ago

The current unity integration demo requires users to build and run the project, so it works for releasing and running a Unity project, but not for running with the editor.

The issue is when users drag the DLLs into Assets, there is no error, and can use the DLL in visual studio. However, when pressing play in the editor, it says that the C DLL is not found and errors with DLLNotFoundException: DHARTAPI.dll. When using build and run the target project does work.

I am not sure how to solve it, or how to make the process easier.

cadop commented 2 years ago

Temporary solution:

Add the DLLs to the Unity Editor folder

cadop commented 2 years ago

This bug is caused by the tbb.dll used by the unity editor being for an older version of msvc. For some reason unity editor is taking priority over dhart dll's. For now the fix is to replace Unity Editors tbb.dll in the Editor folder (you don't need to copy all the dlls).

cadop commented 1 year ago

Maybe we can build with a modified name of the tbb.dll to stop the Unity Editor from prioritizing its own version for dhart