In a previous post, I talked about the fact that Microsoft purchased SyntaxTree and that means that the plugin to allow Visual Studio to be the editor and debugger for Unity is now available for free.
There were a few things that needed to be addressed in the plugin before it was released, but now it is available in the Visual Studio Gallery. In Visual Studio 2013, go to Tools -> Extensions and Updates. Go to the Online section and to Visual Studio Gallery. As I write this, the plugin is the top plugin, but if it is not, then just search for Visual Studio 2013 Tools for Unity.
On to Unity
So at this point when you start Unity up and add a new script file, you will find that the default editor is now…. still MonoDevelop. If you manually changed the editor in the Preferences in Unity to Visual Studio then set it back to MonoDevelop. You might see a UnityVS.OpenFile option and that is the one that will allow you to use Visual Studio 2013, if you do not see it, don’t worry.
When you have a project up, Right Click on the Assets on the Project Pane. From this menu, click on Import Package. You will see in the Import Package menu the new option of Visual Studio 2013 Tools. This will add a UnityVS Folder to your project.
When you open up a script file, Visual Studio is now the default editor. You get all of the Intellisence and other VS features. One thing that you will notice is the button to run your program in debug or release is now showing something else. The options for the button are now set to “Attach to Unity” or “Attach to Unity and Play“. The first one will just attach the debugger to Unity and then you have to play your scene yourself. The second option will do the same but it will play the current scene. Any breakpoint that is set, will be stopped at now.
UnityVS is a great tool to help people that use Unity 3D to be able to use Visual Studio for editing and debugging. This means the tool that developers normally use is what they can use for all of their scripting work in Unity. MonoDevelop is not a bad tool, but now it is easy and free to use the best coding IDE for your game development – Visual Studio.