

Visual Studio Code will automatically install all the extensions the Unity extension depends on, including C# Dev Kit and C# extensions.

Then just install the Unity extension for Visual Studio Code. 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.Īfter that, just put a breakpoint in your code and run your game in Unity! Getting Started with the Unity extensionįirst, you’ll need at least Unity 2021. 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. The extension also includes the Unity Roslyn Analyzers project, giving you custom suggestions and code fixes tailored to Unity. 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. What is the Unity extension? Code Editing powered by RoslynĬ# editing is backed by the newly updated open-source C# Extension, giving you powerful IntelliSense code-completion. C# Dev Kit and the Unity extension borrow some familiar features from Visual Studio and Visual Studio Tools for Unity to enhance your productivity, making your Unity development delightful with C# in Visual Studio Code, regardless of the platform you target desktop, mobile, or consoles, and everything in between. With this extension, Visual Studio Code becomes a great companion application to Unity where you can write and debug your Unity games. Install Unity extension for Visual Studio Code
