Hi!
We are currently evaluating Unity 3.1 for our next project.
As recommended in this posting, we moved all of our game code to a Visual Studio solution outside of the asset folder. This enables us to use namespaces and multiple projects inside of this one solution. The build target of the managed assembly is a folder in the Asset folder of our Unity project. This works fine, created scripts are available in the Unity editor and the managed dll can also be used when deploying the project for the web player.
However, I did not manage to configure the external solution correctly for debugging. How can this be achieved?
This is what I tried:
I added the project file automatically created by Unity to our solution and set it as startup project (there are still a few scripts left in the asset folder). When I open the solution in MonoDevelop I can start the Unity project from there. The few scripts in the startup projects can be debugged without problems. However, all the code in the external VS project can not be debugged, Breakpoints are not reached, even thrown exceptions only show up in the Unity Console, not in MonoDevelop.
Is there a way to enable debugging for external, managed dlls? (Note: the .pdb file for the assemby is build and copied to the same destination as the corresponding dll inside the asset folder)
Being able to debug and step through our code is a crucial feature for us as it is a very convienient way to find and fix problems in the code.
Best Regards,
Johannes Scharl
Lead Programmer
Cliffhanger Productions