How do I use an external library in a Unity script?

It's strange, when I compile it in Visual Studio all is good, but the editor keeps complaining that it cannot see the reference. Moreover, if I add references and projects to the solution, and then I use the editor, when I come back to Visual Studio it says that the solution has been modified and removes all the added references and projects. Ideas?

Thank you

2 Answers

2

Ok, the problem was that the external library must be put under the `Assets` folder, otherwise Unity won't consider it.

So what you are saying is you can't use external libraries, they must become internal. Copying them into each project I want to use them in is really no solution at all, and linking folders in is a pain. Silly Unity, why can't you just have a Paths option like.. every other development system under the sun??

I know this is an ancient post, but apparently Unity does not have this feature yet, for reasons unknown. Please vote this if you want it: here.