We have added a new workflow improvement to MonoDevelop-Unity 5.9. The target selection list is now populated with Unity targets, highlighted with an orange outline in the screenshot. MonoDevelop-Unity will now attach to the selected target with a single click on the “Run” button so you can avoid multiple clicks in the “Attach to Process” dialog when starting a debug session.
You can try MonoDevelop-Unity 5.9 today by downloading the MonoDevelop-Unity 5.9 preview builds from the forum. Feedback on the forum is more than welcome! MonoDevelop-Unity 5.9 is a drop-in replacement for MonoDevelop 4.0.1 and can be with used with Unity 4.6 and Unity 5, see minimum requirements in the forum thread.
Besides upgrading MonoDevelop-Unity we have also been working on fixing script debugging defects in Unity that affect both MonoDevelop-Unity and Visual Studio Tools for Unity.
Notable script debugging defects fixed in Unity 5.3 and Unity 5.2.2:
We’ve also fixed script debugging defects that are specific to MonoDevelop-Unity 5.9.
Notable debugging defects fixed that are specific to MonoDevelop-Unity 5.9
Download MonoDevelop-Unity 5.9 preview builds from the forum.
Today the integration between MonoDevelop-Unity and Unity happens through the solution (.sln) and project (.csproj) files.
This setup is less than ideal since Unity needs to update the solution and project files each time you add, remove, move or rename script files in your project. Once the updated solution and project files have been written to disk, MonoDevelop then needs reload them. A better approach would be to have Unity communicate directly with MonoDevelop on each change to the file structure of your Assets folder and have MonoDevelop update accordingly.
Another issue with using solution files is that we are not using the same C# compiler when compiling your scripts in Unity and in MonoDevelop. This can lead to different compile errors and warnings in MonoDevelop compared to Unity, and in some cases scripts will compile in Unity but not in MonoDevelop and vice versa.
To address these issues and allow for a tighter integration between Unity and MonoDevelop, we are working on a new feature that makes MonoDevelop and Unity talk to each other using REST. What this means in practice is that MonoDevelop and Unity communicate directly with each other using a network socket and generation of solution and project files is no longer necessary.
Instead, MonoDevelop will display a hierarchy view of your Assets folder sent from Unity as a REST message. The Assets folder view in MonoDevelop will be updated on each change to your Unity Assets folder file structure. It will also be possible to add, remove, move and rename files in the MonoDevelop Assets view and the actions will be sent via to Unity to be performed. Once the file action have been performed in Unity, Unity will notify MonoDevelop of the changes to the Assets folder file structure and the Assets folder view in MonoDevelop will be be updated accordingly.
The screenshot below shows how the Unity Assets Folder view in MonoDevelop looks currently and is likely to change before release.
MonoDevelop will also use the REST service to compile your scripts in Unity and then Unity will send the build results back to MonoDevelop. The build results in the screenshot above were delivered to MonoDevelop from Unity.
The REST service is not limited to file operations and compiling your scripts. It can be used for any feature that is exposed as a REST endpoint in Unity.
Here are some of the features we have planned for the MonoDevelop and Unity REST Integration:
We are currently working towards releasing the Unity and MonoDevelop REST integration in Unity 5.5. Keep an eye on this blog as we will be sharing more details in the coming months.