Unity Add-ins for MonoDevelop/Xamarin Studio 5.9+

Important: These add-ins are no longer being updated!

We are at Unity currently in process of updating MonoDevelop to version 5.9, which is the same version that Xamarin Studio 5.9 is based upon. However, it might be a while before MonoDevelop 5.9 is actually shipped with a Unity release.

To reduce the waiting time we are now releasing the Unity Add-ins (Boo/UnityScript/Debugger) for MonoDevelop/Xamarin Studio 5.9 for early testing and feedback.

This means that by installing Xamarin Studio 5.9 and installing the Unity Add-ins below, you can now use Xamarin Studio 5.9 for opening, building and debugging any Unity generated MonoDevelop project/solutions. We have also implemented a new feature so now you can attach to the Unity editor, platform/web/iOS/Android players from the target selector directly without using the attach to process dialog.

We will be monitoring this thread for user feedback, so please let us know if you have issues or requests for the add-ins. We are especially interested in any issues you might encounter with the debugging; broken/incorrect behavior, Unity locks up, etc.

It would be very help to us if you could report any issues you encounter through Unity’s bug reporter (open Unity, Help ➔ Report a bug…) and attach a project which reproduces the issue and post the case number for the bug in this thread. Providing a Unity project with a bug report makes it much easier for us to reproduce and resolve issues.

Please check the minimum requirements, as a recent patch release of Unity is required for these add-ins to work correctly.

Download

Unity Add-ins 5.9.1: http://files.unity3d.com/lukasz/Unity-Addins-5.9.1.zip

Minimum Requirements

MonoDevelop/Xamarin Studio: 5.9 or above: Download | MonoDevelop
Remember to install the required packages as well!

Unity 4.6+: 4.6.5p2 or above
Unity 5.0: 5.0.2p2 or above
Unity 5.1+: 5.1.0p1 or above

Unity patch releases are available here: Download Archive

Installation

  • Unpack the zip file. You will now have 4 files with an .mpack extension.

  • Open MonoDevelop/Xamarin Studio.

  • Open Add-In Manager

  • OSX: Xamarin Studio âž” Add-in Manager.

  • Windows: Tools âž” Add-in Manager

  • Click “Install from file” and select the 4 .mpack files.

  • Restart MonoDevelop/Xamarin Studio.

  • You should now be able open, build and debug any Unity generated solution/projects.

New features

  • Attach to Unity Editor, OS/Web/iOS/Android player using target selector.

Not supported

  • Boo/UnityScript: Code completion and source navigation.
  • Debugger: Launching Unity from MonoDevelop/Xamarin Studio.

FAQ

  • Unity crashes when I start debugging.
    Make sure you have the Unity versions listed in Minimum Requirements or newer installed.

  • After setting Xamarin Studio as my External Script Editor, Xamarin Studio does not open the solution when I click a script in Unity.
    You need to “Sync MonoDevelop Project” from the “Assets” menu in Unity to make Xamarin Studio open the solution.

Alternatively, if you have “MonoDevelop” (case does not matter) in the path to your Xamarin Studio installation, then Unity will open the solution like for MonoDevelop.

For instance if your Xamarin Studio path is “/MonoDevelop/Xamarin Studio”

  • Attach to Process Dialog is shown when trying to attach to a target from the drop down list.
    This dialog will be shown if there is more than 1 instance of that target running. E.g. will happen when “Unity Editor” is selected and you have multiple instances of Unity Editor running.

Changelog:

Unity Add-ins 5.9.1 - http://files.unity3d.com/lukasz/Unity-Addins-5.9.1.zip

  • Fix issue with breakpoint properties condition input field being disabled.

Unity Add-ins 5.9.0 - http://files.unity3d.com/lukasz/Unity-Addins-5.9.0.zip

  • Initial release

Source code repositories

15 Likes

Awesome… thanks.

So, I added the files and restarted Xamarin Studio. When I double click a script in Unity, it opens the script, but not the solution. This is just like the behaviour without the add-ins.

Is that intended behaviour?

As it is, I have to use the “Sync MonoDevelop Project” every time I start up Unity.

I’d expect the solution gets loaded just like when using MD.

Edit: Hmm, I seemed to have missed the 5.0.2p2 and above bit… I am on 5.0.2f1.

Should that really prevent solutions from auto loading?

We have special case handling for MonoDevelop in Unity, so if you have “MonoDevelop” (case does not matter) in the path to your Xamarin Studio installation, then it will open the solution like for MonoDevelop.

For instance if your Xamarin Studio path is “/MonoDevelop/Xamarin Studio”

Wow, that’s ugly. Can you just not get it opening the solution no matter what? Change in the next patch maybe?

The reason we do not always open the solution is because not all script editors support solutions.

I’ll add doing special handling for Xamarin Studio on my todo list.

1 Like

Thanks Lukasz!

Removing breakpoints after attaching the debugger doesn’t seem to work, they still get hit. Using Xamarin 5.9.1 (build 3) and Unity 4.6.5p3. Is it a know issue?

Perhaps you could add a toggle that allows developers to set whether or not the Solution should be opened? This could help alleviate the need for “magic directory structures”, make the distinction clear to the user (provide insights into “why” things don’t work), and provide a suggestion that the user should check for Solution support in their favorite editor.

A tooltip could give a more technical explanation for what’s happening: “Not all editors support solutions. Enable only if your editor supports Visual Studio-style Solutions.”

1 Like

Great news. Going to check it out now. One question though - does MonoDevelop still exist ?

Even the download page links to Xamarin Studio (Download | MonoDevelop)

There is quite a difference on the standard syntax highlighting, MONO left, Xamarin right:

@knotFF I am not sure highlighting is part of the AddIn. They both can be extended with different highlighting schemes (or did you use the same one for both ?)

This is great news thank you! No problems so far 5.0.2p3 and xam 5.9.2 (build 2). The “include /MonoDevelop/ in application path” tip was really helpful too.

One thing I’m noticing is that every time that a compile error in the Unity console is clicked it opens a new instance of Xamarin.
When pointing to MonoDevelop and a console log is clicked, it opens the file in the same MonoDevelop instance.

I’m using Unity 4.6.5p3

Are you having this issue with the editor or a player? If you could submit a bug report with a small repro project, that would be very helpful. Thanks.

I think it would make sense to add this if there were other editors out there that supported VS-style solutions besides VS/XS/MD, but I am not aware of any. For VS/MD/XS we will keep the special handling, so it always works out of the box.

Yes, MonoDevelop does still exist, but no one is releasing builds of it as far as I know. You can build it from source, which I have been doing when developing these add-ins :slight_smile:

Xamarin Studio is branded version of MonoDevelop with some additional features.

For C# we do not provide any special syntax highlighting and just use the built-in one.

Thanks for reporting this, I will add this my list of issues to fix.

2 Likes

I used to have the “Mono Soft Debugger Support for Unity” and the “Utilities for use with Unity” installed from Xamarin’s Add-in repo (beta channel I think…)
Isn’t it possible to publish these updates through that channel so we get notified of new updates automatically?

1 Like

The issue happens when I attach to editor. I’m on OSX 10.10 by the way.

I submitted a bug, but am not receiving a confirmation with case ID. It submitted it with email valdis [at] sybogames.com.
I attached a repro project to the post, but it’s almost empty, contains default scene with camera and a script with one Debug.Log in Start() function.

Repro steps:

  1. Place breakpoint in Start() function
  2. Attach debugger
  3. Remove breakpoint
  4. Launch play session in editor and notice that debugger stops where breakpoint used to be

2139829–141051–XamarinDebuggerBug.zip (139 KB)

1 Like