If you are anything like me, you really like the Visual Studio IDE. I have been using the Visual Studio editor since it’s initial launch back in 2002. I know that there was something before that, but the full integrated IDE didn’t happen until after the release of .Net. Anyway, when I’m using Unity and developing the scripts in C#, I prefer to use Visual Studio as my IDE. Let me show you how you can configure Unity to use Visual Studio 2012, or 2013 as the code editor.

Visual Studio 2012

Unity 4.3 has a preference setting which you can easily use to change the ‘External Script Editor’ from the default of MonoDevelop, which Unity will automatically install for you. To get to the setting, use the main menu, select Edit->Preferences.

 image

In the ‘Unity Preferences’ dialog box that opens, select the second tab on the left labeled ‘External Tools’. You can then use the ‘External Script Editor’ field and dropdown to change the setting from MonoDevelop, to Visual Studio 2012.

image

Visual Studio 2013

To set your editor to be Visual Studio 2013, follow the same steps for Visual 2012, except, choose the ‘Browse…’ option in the ‘Unity Preference’ dialog box, under the ‘External Script Editor’ setting.

Then use the ‘Browse for application’ dialog box to find the devenv.exe associated to Visual Studio 2013. This is normally located in “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\”

image

Select ‘devenv.exe’ from the ‘Browse for application’ dialog and click ‘Open’. The setting should now read ‘Microsoft Visual Studio 2013’.

image

From now on when you open a script file in Unity, it will launch the version of Visual Studio that you have configured it for.