- Home /
Why is my managed plugin not being referenced.
I am using Unity 2018.2 with visual studio 2017. I have created my own dlls for my data access and event layers. I've tested these dlls with a console app and they compile and work properly. They are created on .Net 4.7.1. Compiled the projects and copied the appropriate dlls to the Assets folder. I was able to get the Managed Plugin Import in the inspector however these dlls were not referenced in the visual studio project when I have unity generate it.
After that I find this guide on managed plugins and follow it. Same issue the dll is still not referenced in the project. I then try and force add my reall dlls to the visual studio projects. This works and I have access to my namespaces. Of course this doesn't fix anything as Unity still does not reference my dlls.
I am new to unity so there is something in the system I'm probably not doing correctly. How do I get this to work?
Answer by ericwx1 · Aug 21, 2018 at 12:20 AM
Was not aware there was an option to point Unity to different Frameworks. Under Edit -> Project Settings -> Player the PlayerSettings should open up in your Inspect Window. Under Other Settings there is the setting API Compatibility Level. Mine was set to 3.5 I changed it to 4.x and it works just fine. I did not know about this setting until I found this blog post