A Game Design Tip a Day #9 – [Unity C#] Ditching MonoDevelop for Visual Studio

Unity ships with MonoDevelop, an IDE which does the job fine for the most part. Until it crashes, which is all the time. Or until it runs slowly, which is all the time. Or until it forgets to autocomplete my code, which is all the time. Or until— okay, you get the point, I’m not MonoDevelop’s greatest fan. It’s slow, prone to memory leaks and lacks in features. Plus it’s deleted all of my project’s code on more than one occasion for some inexplicable reason. But it’s fine, because we have a saving grace! Many Unity developers (well, many developers full stop) prefer to use Microsoft Visual Studio. And why wouldn’t they? Microsoft has a solid developer network, very good code documentation and an extremely reliable IDE. Plus they literally invented C#, so there’s that too.

As far as IDEs go, this is the sexiest. Well, maybe after Sublime Text with the Monokai theme.

Visual Studio now has a free Community Edition, so you poor saps out there who don’t have enough dosh for the Professional Edition (or haven’t had it thrown at you by your university) can go grab it for the same price as going outside for some air. Given that you’re looking up game design tips, going outside is probably something you should go do after reading this. We all know that ‘free’ is the best number, so there’s really no excuse to not get it.

The biggest aspect that Visual Studio trumps many MonoDevelop alternatives in is interoperability with Unity’s features. There’s a fantastic plugin called ‘Visual Studio Tools for Unity’ which allows you to debug your Unity project in Visual Studio as easily as you would do using MonoDevelop, plus it has code completion for Unity-specific code that’s better that MonoDevelop (it doesn’t have any more code completion features, it’s just that VS is infinitely faster at it than MD).

One thing that did throw me at the beginning was that Visual Studio very much sits in the “open curly braces on a new line” camp; so much so, that it will try enforcing the practice upon you. To begin with, I was fiercely opposed to this oppressive conduct like a Lincolnshire village opposing a new wind turbine being built within a 10-mile radius, but now I’m kind of glad I went along with it because my code is actually much neater. It’s great if you’re already in the (superior) new-line crew, but it might be strange for you “open curly braces on the same line” slobs.

The eternal struggle. Courtesy of Shutterstock and some dodgy GIMP work.

For all you Unity developers, I cannot recommend Visual Studio enough, especially when compared with MonoDevelop. At least Visual Studio has never somehow deleted everything I’ve been working on.