VSCode as an alternative to MonoDevelop for Unity

Ever since I can remember Unity comes with a tweaked version of MonoDevelop to help you produce your code magic and it’s truely not satisfying to work with. But there is an alternative named VSCode that is working on Windows & Mac alike. And you are about to read about it right now.

Update 03/26/2016: New article about How to debug with VSCode & Unity

 

Ah, MonoDevelop. It was a burden I was willing to take on because I got used to it and there were no good alternatives for me when working with Unity. It was running slowly, the code formatting has never really worked for me. In fact it was driving me insane. Even though I tried my best to set it all up to meet my needs, it still felt broken. Maybe it’s my fault. Maybe I’m too impatient/incompetent. But maybe not. Looking at the amount of complaints about this editor I am not the only one out there.

Yes sure. Visual Studio is the way to go. But as we all know it doesn’t run on OS X.  And what should you do, if you switch your working environment frequently? I work on a Windows PC and a Macbook Air. Sublime comes to mind. Great editor. But then again I’m to lazy (stupid) to do the bridging with Unity. But then I recently stumbled across VSCode from Microsoft. It looks like a Sublime version of Visual Studio with their logo on it. Ok, just another windows-only editor from Microsoft? Nope.

Let’s see:

  • It’s free – Check
  • It is working on Windows and OS X – Check
  • It formates the code exactly as I like it – Check
  • It’s fast and responsive. Even on my aging laptop. – Check
  • The syntax highlighting is good. I would like my class names colored, too. But anyway: Check
  • And: there is an easy to integrate bridge to Unity – Oh yeah!

 

Bring together Unity & VSCode

To integrate VSCode in Unity you first download VSCode and install it.

You then go visit Github and download the Unity Visual Studio Code Integration from dotBunny. Import these files in your Unity project. It’s important to put place them under an Editor folder in your project. Once you’ve done that, navigate to the Unity Preferences and select VSCode. Check the Enable Integration option. That’s it. You’re good. Enjoy your new code editor. 🙂

Alternatively you can download the files directly from the Unity Asset Store.

Further information can be found on the offical VSCode website. Even though they might be a bit outdated.

 

Debugging with VSCode

Since I’ve got alot of questions about how to debugging your with VSCode, I wrote another article. You find it here: Debugging Unity projects in VSCode

 

Unity 5.5 integration coming?

Rumor has it that Unity is going to add VSCode support for the upcoming version 5.5.

9 thoughts on “VSCode as an alternative to MonoDevelop for Unity

    1. You can rename symbols like fields and methods project-wide (press F2). But i have not found any “extract as new method” functionality or other tools yet.

  1. For the most part, VSCode is great, but the lack of proper code highlighting makes it a no-go for me. The large majority of the code is not properly coloured which makes the code very hard to read.
    Hope they can improve that in the next releases because besides that it’s an amazing replacement for the old and sluggish MonoDevelop.

      1. None of the .cs files in my project show any code highlighting. I’m able to select Color Themes, and I see the background and text color change. However, there is no code highlighting, all the code is the same color. Any tips?

  2. Renaming symbols appears broken in VSCode v1.2, and C# formatting hasn’t worked once. I agree it’s a nice editor, but definitely feels like an Alpha release when attempting to use it with Unity.

    Not sure what I’m missing…

    1. For what it’s worth, I had both C# and C# Legacy installed—by uninstalling C# and leaving only the legacy support installed, it seems to fix my issues!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.