I'm going to make arguments for and against using DLLs with Unity. NET libraries that can be installed through nuget (at least the ones that work with Mono/Unity). Many of the packages for sale on the Unity Asset Store include DLLs rather than source code. You have probably even done this already. ![]() Indeed we can make use of DLLs that have been created for us by other developers. This leads us to the understanding that we can copy pre-compiled DLLs into the project and Unity will recognize them. You can see for yourself that Unity automatically compiles your code to DLLs. Go and check if you like, take a Unity build and search for DLLs in the data directory. Note however that DLLs do get created, it's just that they are created for you (possibly without you even realizing it). This is the default way of working with Unity, and is what you learn when introduced to programming through Unity. ![]() It's only with Unity that the rules have been changed: Unity automatically compiles code that is included in the Unity project. NET assemblies) are the normal method for packaging your code and distributing it as an application. NET programming world in the time before Unity, exes and DLLs (both being. If you have started programming with Unity, the way source code is included in the project and automatically compiled will seem normal. These problems can be very difficult to solve and I'll come back to that in the future. Especially if you don't know where the DLL came from, what it does or what its dependencies are. Of course, any number of problems can and do happen. You can copy the DLL into your Unity project and (presuming it actually works with Unity) start using it. You may have compiled it yourself, got it from a mate, got it from the Asset Store or somewhere else, it doesn't matter. In a future article I'll give you some tools to help solve the issues that will inevitably come up. Of course, it's almost never that simple in real scenarios, however I will demonstrate that it can be that simple. The starting point for this article, is the understanding that a DLL can simply be dropped into your Unity project, Unity will detect it and you can then start using it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |