Unity is a popular game engine, which has now expanded beyond video games to technologies related to virtual reality, automotive, and architecture. For now the Unity extension is available in preview. 

According to Microsoft, the extension builds on the C# Dev Kit that was released earlier this year, and other C# extensions.

“With this extension, Visual Studio Code becomes a great companion application to Unity where you can write and debug your Unity games. 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,” Jb Evain, principal software engineering manager at Microsoft, wrote in a blog post

It offers AI-powered capabilities like IntelliSense code completion and starred suggestions as you write code. It also makes use of the Unity Roslyn Analyzer project to provide suggestions and code fixes that are specific to Unity. 

Developers can also easily debug their Unity applications on any platform supported by Unity. According to Microsoft, this is as simple as pressing F5 to attach the debugger to the game, and then adding a breakpoint in the code. 

In order to use the Visual Studio Code extension, developers will need to be running Unity 2021 or later and have the C# Dev Kit enabled. When installing the extension, Visual Studio Code will also install any needed dependencies. 

As this is a preview release, Microsoft is requesting developers try it out and submit feedback through Visual Studio Code’s “Report Issue” dialogue.