I'm developing a dll that is to be used in two Unity projects.

I've read that the way to reference a dll is to drag it into a 'plugins' folder so that it is added to the Unity project's dependencies, as their is no "add reference" available for this project in Visual Studio.

But doing that the Unity project does not take into account that the dll evolves (as it is still in development).

What I'd like (if possible) is to set up an automatic way so that the Unity projects update their dependencies when the shared dll is updated.

I've try the reimport option (right click on the dll in Unity) but it seems that it is not working.

What is the best way to manage this situation?


It seems like less an issue with Unity, more one with Mono not handling updated dlls very well. It's been discussed on Unity Answers.

It looks like the two options for solving this are:

1) Restart Unity each time a dll is updated 2) Implement a wrapper around your library that uses LoadLibrary/GetProcAddress instead of DllImport

| improve this answer | |
  • \$\begingroup\$ thanks. fyi I've received an answer here stackoverflow.com/questions/48961693/…. It is not perfect as compiling the dll is required each time you want to use dll new features in the Unity project, but it is easy enough as there is no better answer in my opinion for now. \$\endgroup\$ – lemon Feb 26 '18 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.