I am creating a engine / dynamic scene model for our application where we have a core engine that is always loaded and a set of dynamic asset bundles with accompanying scripts that can plug and play.
I have all of the core stuff wrapped in an SDK namespace and all of the scene stuff wrapped in it’s own namespace.
What I would like to do is compile all of the SDK stuff into a mono DLL that can be used as a reference to compile the individual scene scripts such that the original SDK is not included in each scene compilation. This would be similar to the UnityEngine.dll or UnityScript.Lang.dll or what have you that allows one to reference classes like MonoBehavior without needing to compile in the code. Or perhaps a third-party plug-in that is only available in DLL form.
I am not sure the type of project file / make file I would need to set up in order to accomplish this, but know quite a few developers who have easily done this.
It would be ideal to just package the SDK similar to a third-party plugin which can then be included in any scene project.
Just create a .NET 3.4 class library and compile all your code there to a dll; then place the dll in your assets folder and reference the namespace in your unity project and you should be good to go. Easy peezy lemon squeezy.
Thank you very much for your response! This is exactly what I was looking for.
I seem to be having a heck of a time with MonoDevelop. I’ve either copied the .sln file or created a new library project, but I can’t seem to get it to spit out a build which references UnityEngine.dll
When creating a new c# library project, a DLL builds fine up until the point which I add “UnityEngine” as a reference (from /Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll as in the standard project files). As soon as I add this reference, my MonoDevelop will not build an output, even though there are no warnings nor errors. I was able to add the Boo.Lang and UnityScript references just fine…
I don’t know about MonoDevelop since I don’t use it; my tool of choice is Visual Studio (you can get the free Express edition from Microsoft) and I’m able to easily reference the UnityEngine.dll (I do it all the time). Why not give Visual Studio a try?
Thanks again for the advice. I’ve used Visual Studio on a number of non unity projects in the past and it would be nice to use, except there are others on our developer team and we are all using Macs. So even if I figure out how to properly tie in Parallels, etc… I can’t expect the rest of my team to do so also.
I’ve been able to automate some of the process for building the SDK and DLLs from perl driven gmcs scripts. ( http://eej.dk/angryant/general/tipsandtricks/assembling-and-assimilating/ ) and even wrapped them in an editor script, but nothing replaces the ease of MonoDevelop (or another IDE) for the SDK editing and debugging.