Microsoft has recently released the first preview of the Unity extension for Visual Studio Code. This extension provides Unity developers with a lightweight and streamlined development experience.
The extension builds upon the rich C# capabilities provided by the C# Dev Kit and C# extensions. The first preview of the C# Dev Kit was also recently released (past June) and provides features such as a native Test Explorer, a dedicated Solution Explorer, and the incorporation of AI in code authoring.
![](/uploads/6ca4b806-76e1-40f8-9d4f-497f3180b841/Visual_Sudio_Code_&_Unity.jpg)
Both the Unity extension and the C# Dev Kit borrow some familiar features from Visual Studio and Visual Studio Tools for Unity. These features enhance productivity making for a seamless development experience regardless of the target platforms.
Some of the productivity features of the Unity extension include:
Improved code editing
The Unity Extension provides an improved editing experience powered by an updated open-source C# Extension. You now have access to powerful IntelliSense code-completion, IntelliCode and AI-assisted features such as whole-line completions and starred suggestions as you type.
![](/uploads/495e4810-4bfb-4d71-93db-9bb7968aca14/Visual_Sudio_Code_Unity_Extension_IntelliSense.jpg)
Debugging
Whether your games are running within the Unity Editor or as standalone applications on any Unity supported platform, you can easily initiate debugging.
You can simply press a key to attach the debugger to your game running in the Unity Editor, or take advantage of the new Attach Unity Debugger command. This command displays a list of available Unity Editors and Unity Players, allowing you to easily select the one you want to debug.
Besides the above features, the Unity Extension also includes specific C# analyzers, refactorings and code coloration for Unity file formats (.asmdef, .shader, .uss, .uxml).
The Unity Extension has the following requirements:
- Unity 2021 or greater.
- Activated C# Dev Kit extension in Visual Studio Code.
- .NET 7 SDK or greater, the C# Dev Kit will install it if required.
- Visual Studio Editor 2.0.20 or greater (Unity package) .
You can install this extension by searching for “Unity” in Visual Studio Code or by visiting the Visual Studio marketplace.