Working with Unity3D and Visual Studio 2013

37,153

Solution 1

I wrote a blog article on this awhile back on my blog HERE for Visual Studio.

However I will paste it here too:

How to use Visual Studio 2013

  1. Recently Microsoft bought and re-released the popular Unity3D plugin UnityVS. The now renamed Visual Studio Tools for Unity plugin smooths the connection between Unity and Visual Studio and even allows one to perform debugging too! Download it here.
  2. In Unity Editor go to Edit->Preferences->External Tools and In External Script Editor choose Browse from the drop down box.
  3. Browse to and select C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe.
  4. The External Script Editor should automatically show your selected editor as Visual Studio 2013.
  5. That’s it! It should just work from that point on.

Solution 2

As an important update, I would like to notice, that former UnityVS (after Microsoft's acquisition of SyntaxTree) is now available for free as a rebranded Visual Studio 2013 Tools for Unity.

The versions for VS 2012 and VS 2010 are also available.

Solution 3

The integration of Unity3d and Visual Studio got simpler with latest Unity (version 5) and Visual Studio Tools. This is the current procedure.

To use Visual Studio as editor and debugger with Unity you must:

  1. Install the Visual Studio Tools For Unity. For this download the package at http://unityvs.com (careful to get the version for the Visual Studio you are using) and import it (as is standard in Unity for packages) by going into Assets -> Import Package -> Custom Package and browse to the tools installation folder and pick the package.

  2. Once installed in Unity you will get an additional menu Visual Studio Tools, go there and select "generate project files". Visual Studio will already be the default editor for your scripts.

  3. This done, if you say put a breakpoint in Visual Studio, click on "Attach to Unity" in Visual Studio, and then run your Unity project, the process will stop at breakpoints in Visual Studio and allow variable inspection etc.

Solution 4

you can use unityvs VS plugin (but I'm not sure about current 2013 support, it's works with vs2012) http://unityvs.com/ - on windows it's works very well, but remote OSX debugging feature is not ready yet

Solution 5

I'd like to add to the fine answer given by Pietro Polsinelli, that for me, there was an extra step in his Step 1. And that is that, after installing Visual Studio Tools For Unity, I had to, in Unity, go to Assets->Import Package->Visual Studio 201X Tools and then click around on the menu bar until "Visual Studio Tools" showed up as an option. After that, I could Generate Project Files and Open in Visual Studio.

This enabled me to Attach to Unity in Visual Studio and debug.

Share:
37,153
Kaoru
Author by

Kaoru

Updated on July 09, 2022

Comments

  • Kaoru
    Kaoru almost 2 years

    how do i get Unity3D for debugging the code, and Visual Studio 2013 which i have now to only script the code. Example: Like Flash Professional for debugging and FlashDevelop for scripting only.

    My question is, how do i get the Unity3D link with Visual Studio 2013. I already searching around the internet, and had found that Unity3D only works with VisualStudio 2010.

  • strobe
    strobe over 10 years
    from unityvs.com/news - The UnityVS team is proud to release our same day support for Visual Studio 2013. All UnityVS customers can download it from their account.
  • Adam
    Adam almost 10 years
    Be sure to run Unity as Administrator