Today, we are thrilled to announce the general availability of the Unity extension for Visual Studio. This extension, built upon the C# Dev Kit and C# extensions, gives you a comprehensive toolkit for your Unity development in Visual Studio Code across Windows, macOS, and Linux.
We shipped the first preview of the Unity extension for Visual Studio Code last year and have been working since on improving the experience thanks to your feedback!
What is the Unity extension?
Code Editing powered by Roslyn
C# editing is backed by the C# extension, giving you powerful IntelliSense code-completion. Along with the IntelliCode for C# Dev Kit extension, you get AI-assisted features such as whole-line completions and starred suggestions as you type.
The extension also includes the Unity Roslyn Analyzers project, giving you suggestions and code fixes tailored to Unity.
Debug Unity and your Unity games
The extension makes it easy to debug your Unity games, either running in the Unity Editor or standalone, while running on all the platforms that Unity support. Just press F5 to attach the debugger to your game running in the Unity Editor or use the new “Attach Unity Debugger” command to see a list of Unity Editors and Unity Players that you can debug.
After that, just put a breakpoint in your code and run your game in Unity!
How to get started?
Head over to the Unity extension page for a complete README on how to get started, depending on the version of Unity you are using.
What is next?
Today’s official launch is only the start as we will continue to listen to your feedback and work toward improved performance, reliability, and adding features to support your Unity development in VS Code.
Please share your feedback by reporting new issues via VS Code or searching the existing enhancement and issues and give your ‘thumbs up’ or additional context to the issue to help us prioritize.
1.) What do you think about Unity Auto Compilation from VS Code extension for VS Code?
2.) I also think that syntax for methods like:
private void Start() {
}
is better for saving display space and easier to read longer code than
private void Start()
{
}
3.) but that is the decision for C# but not mine and I think it should be otherwise for good programmer habits.
4.) Unity GUI is somehow connected with onMouseDown...
Hi,
I am learning Unity on windows. Currently I’m using Visual Studio as the editor and debugger. Is there a particular good reason to switch to VS Code on windows?
Hi Vincent,
Both tools are extremely capable, but they also have a different approach on many things. Visual Studio is a full fledged and fully featured IDE. Visual Studio Code is more lightweight and focuses on text based commands and scenarios. Visual Studio provides a great IDE experience for Unity, and I personally use both tools, so I’d just suggest to use whatever makes sense for you.