Get started with Visual Studio Tools for Unity
Install Visual Studio
Unity bundled installation
Starting with Unity 2018.1, Visual Studio is the default C# script editor for Unity, and is included in the Unity Download Assistant, as well as the Unity Hub installation tool.
- Download Unity from store.unity.com.
During installation, ensure that Visual Studio is checked in the list of components to install with Unity:
Unity Download Assistant
The version of Visual Studio included with your Unity installation may not be the latest. If you are asked to install Visual Studio 2017, then we recommend manually installing a newer version of Visual Studio.
If you already have Visual Studio installed, or prefer to manually install, run the Visual Studio installer.
Download the Visual Studio installer, or open it if already installed.
Click Modify (if already installed) or Install (for new installations) for your desired version of Visual Studio.
On the Workloads tab, scroll to the Mobile & Gaming section and select the Game development with Unity workload.
Click Modify (if already installed) or Install (for new installations) in the bottom-right corner of the installer window.
Check for updates to Visual Studio
It is recommended to check for updates within Visual Studio to ensure you have access to the latest tools and features. This will not break your Unity project.
Configure Unity for use with Visual Studio
Starting with Unity 2018.1, Visual Studio should be the default external script editor in Unity. You can confirm this or change the external script editor to a specific version of Visual Studio:
Select Preferences from the Edit menu.
In the Preferences dialog, select the External Tools tab.
From the External Script Editor dropdown list, choose your desired version of Visual Studio if it is listed, otherwise select Browse....
If Browse... was selected, navigate to the Common7/IDE directory inside your Visual Studio installation directory and select devenv.exe. Then click Open.
Once Visual Studio is selected in the External Script Editor list, confirm that the Editor Attaching checkbox is selected.
Close the Preferences dialog to complete the configuration process.
Support for older versions
Download and install Visual Studio Tools for Unity from the Visual Studio Marketplace. You'll need to install the right package for your version of Visual Studio.
For Visual Studio 2015 Community, Visual Studio 2015 Professional, or Visual Studio 2015 Enterprise:
Visual Studio Tools for Unity requires Unity 5.2 and above, as well as a version of Visual Studio that supports extensions, such as Visual Studio Community, Professional, Premium, or Enterprise. To verify that Visual Studio Tools for Unity are enabled in your installation of Unity, select About Unity from the Help menu and look for the text "Microsoft Visual Studio Tools for Unity enabled" in the bottom-left of the dialog.
To learn how to work with and debug your Unity project in Visual Studio, see Visual Studio Tools for Unity.