Visual Studio 2013 Tools for Unity

Microsoft Free

Write and debug your Unity 3D games inside Microsoft Visual Studio.

Microsoft
(82) Review
Visual Studio
2013
Download (285,085)
7/14/2016
2.3.0.0
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (82)
Q and A (190)
Sign in to write a review
Sort by:

by Stefan Maton | April 21 2016

Where can we submit bug reports for the tool?

I have this problem:

Debugger detaches when using 2D arrays.

1. What happened

While debugging the code in file "BugCode", the debugger detaches in line 14 containing the code "x++;". This happens always.

When commenting out line 11 containing the if-statement (while keeping line 12), the debugger works as expected.

2. How we can reproduce it using the example you attached

- Open BugScene
- Open BugCode.cs in Visual Studio Community 2015 (with Visual Studio Tools for Unity 2.2.0.0)
- Attach Visual Studio debugger to Unity
- Place breakpoint in line 9
- Start game in Unity.
- Debug step by step.

BugCode.cs:
using UnityEngine;
using System.Collections;

public class BugCode : MonoBehaviour {

// Use this for initialization
void Start () {
int[,] things = new int[10, 10];
int x = 0;

if (x >= 0)
things[x, 0] = x;

x++;
Debug.Log(things[x, 0]);
}
}

Sebastien Lebreton April 22 2016
| Edit |
Delete

Hello Stefan.

You can use the support email vstusp[at]Microsoft[dot]com

I will check you repro to find and fix the bug

Is this something you are reproducing when using MonoDevelop ?

Thanks
Sebastien Lebreton [MSFT]

by alexjosesilva | December 21 2015

Estava procurando há muito tempo por este plugin. Vai mim ajudar em meu desenvolvimento de jogos.

by Lordinaire | July 29 2015

Great tools !

by Stephen Hodgson | July 20 2015

Great tool.

It's saved me lots of time, and love the price.

by DG Osborne | July 18 2015

Thanks for this! Having Visual Studio for Unity development is a must.

by XenStalker | June 12 2015

by formulahendry | April 23 2015

by Protostar Dean | April 21 2015

Great Tool!
However since getting this latest update Unity seems to be crashing very frequently when I am attached.

by 金奇 | April 18 2015

very good

by Bakinovski | April 16 2015

Hello.
While I am debuging I can't see exceptions in debuger.
For example in such source code I can't see object exception at line with Debug.Log
try
{
throw new Exception("test exeption");
}
catch (Exception exception)
{
UnityEngine.Debug.Log("Test exeption was thrown!");
}
Do you have the same issue? If it is bug do you plan to fix it?

P.S. Tool is realy grate - thanks for it.

Sebastien Lebreton April 20 2015
| Edit |
Delete

Hello,

Yes, at this time, the exception object is not properly added to the debugging context so that you will not be able to inspect it using Watch window.

We will add support for that in the final release of VSTU 2.0.

Thanks

by Kuato4 | April 13 2015

by QuYong | April 11 2015

very useful tools for Unity game developing, forget about the MonoDevelop

by KingRecycle | April 11 2015

New version doesn't work for 32-bit so I can't use it anymore. Please fix this.

But other than that it's better than using anything else in my opinion.

Sebastien Lebreton April 11 2015
| Edit |
Delete

Hello,

We have just re-uploaded a new installer with proper x86 support.
Can you please download the file again and try to install it ?

Thanks
Sebastien Lebreton [MSFT]

by CodePiao | April 07 2015

Very Cool .


Use VS 2013, coding for Game。

by AByrd | April 06 2015

A few issues with 1.9.9.0:

Output is now spamming "The thread 0x<stuff> has exited with code 0" at a rate of about 2 per second.

The Error List now flickers open and closed frequently.

Sebastien Lebreton April 09 2015
| Edit |
Delete

Hi!

When debugging, we've always notified what's happening in the output window, including thread creation and death.

You can configure VSTU to not send the Unity console to VS this will avoid the flicker you're seeing. You can do it from Unity, in the menu Visual Studio Tools -> Configuration and uncheck Send Console to Visual Studio.

by nu Assets | March 30 2015

Although the system has some minor bugs, it's probably one of the mightiest add-on you can get for Unity 3D. The integration is 99.9% seamless and its usability is pretty nice. If you're used to work with VS - you probably are as a professional - there's no way around it!

Well done!

by CoRuMmo | March 10 2015

Cannot come back to mono develop. I can't simply stand its interface anymore.
Long life Visual Studio tools for Unity!
Many thanks for this must-have tool.

by AdamNash_FM | March 03 2015

by Yatajga | February 20 2015

by Chad Keating | February 19 2015

1 - 20 of 82 Items   
Sign in to start a discussion


  • Suddenly not working now
    3 Posts | Last post August 09, 2016
    • I have unity 5.3.4, vs 2013 update 5, tools for Unity 2.2 installed.
      
      I can see "Attach Unity Debugger" under the "Debug" menu.
      
      But nothing happen when i try to debug.
      
      It was OK before, not sure why suddenly not working now.
      
      Any advice is appreciated.
      
      Thanks,
      Owen
    • I have found the answer, it's because of Xamarin for Visual Studio.
    • Hello,
      
      VSTU version 2.3 was released with a dedicated fix for this issue.
      
      Regards
      Sebastien Lebreton [MSFT]
  • DebuggerStepThrough Support
    4 Posts | Last post June 15, 2016
    • It seems that VSTU don't recognize [DebuggerStepThrough] attribute.
      Is there any way to use this attribute??
    • Hello,
      
      Indeed, we didn't include support for that. But I have a prototype and can share with you a debug build if you want to try.
      
      Regards
      Sebastien Lebreton [MSFT]
    • And I just remembered why we never released the support for this: we can only detect [DebuggerStepThrough] on types, not on methods, because of compatibility issues with the debugging protocol provided by Unity.
      
      Regards
      Sebastien Lebreton [MSFT]
    • Hello~.
      Then how about adding an option under Tools for Unity -> General -> Debugging ?
      That page have description area about an option.
      You can describe the limitation of the feature.
  • VSTools 2013 installed, but Unity integration failed
    2 Posts | Last post May 10, 2016
    • I installed the whole Unity+VS2013 stack the third time and I cannot make it work.
      
      I do it like this:
      - install german version of vs2013
      - install Update 5
      - install english language pack
      - switch to english version
      - install Unity 5.3.4f1
      - install VSTools for unity from this site
      
      Startup unity, switch the editor to Visual Studio 2013 (Doesn't get detected automatically, have to find the devenv.exe by hand)
      Notice, that in the Help > About Unity window, lower left corner, the indication text for the vs tools are *not* present.
      
      I delete the .csproj and the .v12.suo file, go into our unity project, open up VS with the Assets > Open C# Project.
      
      In VS2013, there is no Unity tab, no "Attach to Unity" button, instead a regular "Start" button, which leads to an error message when pressed.
      
      There is a "Attach to Unity Debugger" menu entry available tho.
      
      I would like to repair my installation, that I have the "Attach to unity and Play" button available, and the Unity Project Explorer instead of the regular Solution Explorer. Something seems to be amiss.
    • Hello,
      
      The issue is here: "Startup unity, switch the editor to Visual Studio 2013 (Doesn't get detected automatically, have to find the devenv.exe by hand)"
      
      Sometimes you have to reboot your computer so that Unity will be able to detect VS. If you select by hand a file, Unity will not use the special code path that calls VSTU to properly generate project files with our own marker.
      
      Without our marker, you will stay with a regular C# project without all VSTU wizards and debug engine.
      
      Regards
      Sebastien Lebreton
      
      
  • DLL debugging and static properties
    2 Posts | Last post April 25, 2016
    • Hi,
      
      We have a medium-large vs solution consisting of 11 projects.
      Each project outputs a DLL and the DLL (incl. PDB) gets copied to Unity using a postbuild action. When making changes to one of the projects and the solution and/or project gets rebuilt, breakpoint debugging doesn't work anymore. One have to manually reimport the assemblies in Unity to make the debugger work again. The files copied by the build action get automatically imported by Unity, but somehow break the line between visual studio.
      
      When it's working then, static properties/fields get not reflected (at breakpoints) if those are defined in an other project but within the same solution. Instance variables get properly reflected.
      
      Is this a known problem or do I miss something here?
      
      Thank you for your answer.
    • Hello,
      
      We should automatically convert pdb to mdb (used by mono for symbols). Can you double check that the mdb file is properly updated when you copy dll+pdb in the project ?
      
      When symbols and source files are not in sync, VSTU can be unable to handle breakpoints.
      
      Any chance you can share with us something so that we can repro your issue?
      
      Regards
      Sebastien Lebreton [MSFT]
  • vstu2.2 for vs2013 provides IntelliSense
    2 Posts | Last post March 23, 2016
    • when I install vstu2.2 successful,but it can not provides IntelliSense.why?
    • Hello,
      
      Can you check that you have XML documentation files in the folder [Your Project]\Library\UnityAssemblies\
      
      Those files are used for intellisense.
      
      Regards
      Sebastien Lebreton [MSFT]
      
      
  • why i can not install vstu?
    2 Posts | Last post February 18, 2016
    • acturely , any of vstu(vstu2010.msi, vstu2013.msi, vstu2015.msi) i can not install
      all of them when click 'Install', then a window flash, then go to finish. and the message on 'finish' window says: '... ended because of an error'
      
      i use log to install, and maybe below is the issue, but i don't know how to fix it:
      
      ....
      Action start 12:54:59: SetUnityProperties.
      MSI (s) (B4:50) [12:54:59:392]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI6D3.tmp, Entrypoint: SetUnityProperties
      MSI (s) (B4:7C) [12:54:59:392]: Generating random cookie.
      MSI (s) (B4:7C) [12:54:59:423]: Created Custom Action Server with PID 7028 (0x1B74).
      MSI (s) (B4:4C) [12:54:59:450]: Running as a service.
      MSI (s) (B4:4C) [12:54:59:451]: Hello, I'm your 32bit Impersonated custom action server.
      SFXCA: Failed to create new CA process via RUNDLL32. Error code: 2
      CustomAction SetUnityProperties returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
      Action ended 12:54:59: SetUnityProperties. Return value 3.
      ....
    • Hello,
      
      Can you send us an email here with your complete log:
      vstusp[at]microsoft[dot]com
      
      Thanks!
      
      Regards
      Sebastien Lebreton [MSFT]
  • Is there a way to auto modify the solution VSTU generates?
    2 Posts | Last post January 21, 2016
    • I searched on the internet and get this very simple class code put in my editor folder, hoping the unity to call my method to allow me to modify the generated C# solution.
      
      using UnityEngine;
      using UnityEditor;
      
      public class NewBehaviourScript : AssetPostprocessor
      {
          static void OnGeneratedCSProjectFiles()
          {
              Debug.Log("call");
          }
      }
      
      but it seems nothing happens when I click "Open C# project" from the menu item.
      BTW, I am using the Unity 5.2.2, do you know what I do wrong here? 
    • Hello,
      
      The best way to interact with VSTU file generator, is to use our custom entry points:
      
      https://msdn.microsoft.com/en-us/library/dn940021.aspx
      
      Also be sure that VSTU is enabled (VS must be chosen as the external editor)
      
      I made some examples here:
      https://github.com/sailro/UnityExternal
      https://gist.github.com/sailro/3b8080394d50c38459f8
      https://gist.github.com/sailro/f4109a1053420509025b
      
      Regards
      Sebastien Lebreton [MSFT]
  • Can't install
    2 Posts | Last post January 08, 2016
    • During installation process, installer get stucked at "Configuring Visual Studio 2013 Templates" phase.
      
      Unity v5.3.1f1
    • Hello
      
      
      This configuration step can be very long, but if it's really stuck, you should try to:
      
      - Restart
      - Go to Programs and Features > Visual Studio 2013 > Change > Repair
      - Retry to install VSTU
      
      Regards
      Sebastien Lebreton [MSFT]
  • Feature Request
    4 Posts | Last post November 29, 2015
    • VSTU has been an absolutely awesome tool for a long time now, and I'm looking to integrate it more deeply into my studios development process. I've come across a few small hiccups that I'd like to share.
      
      We have reusable code that gets used in all of our various projects. These tools are versioned separately and live in their own VS solution. This solution is built into managed DLLs with .mdbs.
      
      What I'm trying to accomplish is an extremely streamlined development experience where the tools source is able to be viewed, modified, built, and debugged all from the normal Unity VS solution, but there are a few "quality of life" concerns.
      
      1) Added project dependencies are removed.
      If I add the tools projects to the Unity solution, then set the Unity projects to depend on them, the dependencies will get blown up when the solution changes. If it weren't for this, it would be possible to have a single step compile in VS where it would compile both the Unity projects and the tools projects and deploy (post build step) the modified tools to the Assets folder. This would be *awesome* for workflow.
      
      2) "Go To Definition" on a tools symbol navigates to the Object Browser for the DLL, instead going to the tools source file.
      This is likely the most difficult to address, but would do wonders for workflow. The cause is that the Unity projects have references to the compiled DLLs in the Assets folder, not to the tools projects. Strictly speaking, this is "correct" behavior, but it introduces a disconnect when navigating from the Unity project code into the tools project code. One solution here is to allow us to set specific references to be ignored and not added to the VS solution. If I could do that and issue 1 above was addressed I'd be able to 'replace' the tools DLL reference with a reference to the tools project and "Go To Definition" would go straight to the tools source.
    • 3) Double clicking a log statement in the Unity Console won't take you to source files in the tools project.
      It will only take you to the highest point in the stack that's in the Unity projects, despite the fact that the stack contains the full path and line number to the tools source because of the .mdbs. In a few cases this is desired (we have a wrapper around Debug.Log that we want to ignore so it takes us to the line where the information was actually logged), but most of the time it is not. It would be great if the default behavior took you to the source line, even if it's in one of the added tools projects. It would also be great if this were optional (e.g. would ignore methods in the stack decorated with [DebuggerHidden] or similar).
      
      4) Solution folders are erased when the Unity VS solution is updated.
      The tools solution has multiple projects. I'd like to be able to collapse everything related to the tools in the VS Solution Explorer. Right clicking the solution allows me to add a folder solution folder that I can parent the tools projects under. But when Unity changes the solution file (e.g. when a reference is added or removed in one of the projects), these folders will disappear and projects end up at the root level in the Solution Explorer again. 
      
      Issues 1 and 2 are the big ones here. With those out of the way, VSTU will provide a fanstastic workflow where external DLL projects are treated almost completely identically to source code in the Assets folder, and that would be simply amazing.
      
      As always, thanks for the great piece of software.
    • Hello,
      
      Thanks for your suggestions and your time, this is really appreciated. Yes we are aware of that and we want to improve the whole workflow.
      
      Currently I think you can achieve #1 and #2 by using our custom API.
      
      I made a demo project on my github page:
      
      Can you have a look and see if it can help you ?
      https://github.com/sailro/UnityExternal
      
      Regards
      Sebastien Lebreton [MSFT]
    • I'll check it out and provide feedback this week. Thanks for the heads up.
      
      Is there a way to enable email notifications for discussions here?
  • File names converted to lower case
    4 Posts | Last post November 25, 2015
    • Hi,
      
      I'm using VS2013 via Parallels, Unity 5.0.1p1 and Tools version 1.9.9. Sometimes, for reasons I can't figure out, the file names get renamed as lowercase whenI save - e.g. MyClass.cs to myclass.cs. This of course causes issue in Unity. I can force the file to save as camel case by simply saving the file again. Oddly, the file name in VS doesn't appear to change. I can't be sure.
      
      Looks like there have been problems with Unity doing this in the past, but nothing I could find recently. Any thoughts?
    • Hello,
      
      Do you hit this issue every-time or randomly ? If you are able to find a way to easily reproduce it would be great.
      
      Regards
      Sebastien Lebreton [MSFT]
    • Sorry for the late response. I haven't been able to identify repro steps for this, but it does seem to be associated with Unity crashing. It is also happening in VS2015 preview, but with far less frequency - in fact only once in the last month. 
      
      I'll keep an eye out for it happening again and try to figure out if there are clear steps to it, but so far it looks random.
    • I'm getting file renaming messages few times a day, usually on the files that I modify. Something (Unity, VS2015, VSTU) is renaming from camel case to lower case and than back to camel case.
      
      Is there some way to turn this off?
      
      I'm running Unity on OSX, and have noticed this issue for the first time when I upgraded from Unity 5.1.3 to 5.2.2, and I'm getting few times every day since then.
      
      See example of error, renaming both ways within a minute.
      
      Renamed .meta file 'Assets/Game/Src/Game/Params/Combat/MegaShipParams.cs.meta' to 'megashipparams.cs.meta' because the .meta file had an inconsistent case.
      
      Renamed .meta file 'Assets/Game/Src/Game/Params/Combat/megashipparams.cs.meta' to 'MegaShipParams.cs.meta' because the .meta file had an inconsistent case.
      
      I'm using VS2015 inside Parallels to edit files, it might be VS that's renaming them, but I've never had this issue before till I upgraded unity. The class name inside the file is camel case as well.
      
      I've just realised I'm using http://www.grebulon.com/software/stripem.php as well, I'll try to disable that.
1 - 10 of 190 Items