The other issue is that when code in a DLL crashes, you can’t simply double-click on the crash in the Unity editor’s Console pane and jump straight to the line for a quick fix. This is easily overcome, as I’ve described in this article. The first is that there is an issue that crops up when dispatching an event from code in a DLL. Lastly, there are a couple of downsides to using DLLs in Unity. Run it like this:Ĭ:\Program Files\Unity\Data\MonoBleedingEdge\lib\mono\4.5\pdb2mdb.exe MyLib.dll Instead, Unity provides a command-line utility to convert PDB files into MDB files. Visual Studio builds a PDB file instead of an MDB and Unity doesn’t know how to use it directly. If you’re building your DLLs with Microsoft Visual Studio, there’s one extra step. Copy this file to your Unity project’s Assets directory along with the DLL and Unity will now have debugging information about your DLL’s contents, including file names and line numbers. If you build with MonoDevelop or Xamarin Studio, there will be a file in the same directory that the DLL gets placed in. Luckily, there is a solution to this issue. Specifically, file names and line numbers will be omitted making debugging much harder. One issue that will crop up at this point is that if any code in your DLL ever crashes, your stack trace won’t contain as much information as it would had you put the scripts directly into your Unity project. Copy this file to your Unity project’s Assets directory or any folder in it and it will be usable by the rest of your project’s scripts. You now have a DLL placed in ProjectDirectory/bin/Debug/ProjectName.dll.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |