Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Visual Studio Code: Unity Extension Now Generally Available

Visual Studio Code: Unity Extension Now Generally Available

Last month, Microsoft announced the general availability of the Unity extension for Visual Studio Code. This extension, built upon the C# Dev Kit and C# extensions, offers a toolkit tailored for Unity development within Visual Studio Code, accessible on Windows, macOS, and Linux operating systems.

The extension was initially previewed last year, and according to the development team, enhancements have been implemented based on user feedback, ensuring an optimized user experience.

The extension integrates with Visual Studio Code, offering a range of productivity features, and the most notable ones are Code Editing powered by Roslyn and also the ability to Debug Unity and Unity games.

Regarding the analyzers, developers benefit from Unity-specific C# Analyzers and Refactorings, providing specialized tools for Unity development. Moreover, as reported, the extension enhances code readability by providing colouration support for various Unity file formats, including .asmdef, .shader, .uss, and .uxml, within the Visual Studio Code environment.

The Unity extension uses Roslyn for code editing, providing IntelliSense code-completion capabilities for C# editing tasks. Furthermore, AI-assisted features like whole-line completions and starred suggestions are available via the IntelliCode for C# Dev Kit extension.

Futhermore, developers can use the Unity Roslyn Analyzers project to provide suggestions and code fixes related to Unity development.

(Unity Roslyn Analyzers, Source: Microsoft DevBlogs)

As stated in an announcement blog post, debugging Unity games is now easier with this extension, debugging within the Unity Editor or standalone mode across all platforms supported by Unity, also with a new feature to attach debugger:

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.

(Attach Unity Debugger, Source: Microsoft DevBlog)

Community feedback on the Unity extension is generally positive, with users acknowledging its productivity benefits. However, issues such as difficulties with debugging on mobile devices and concerns about high memory usage, particularly with the .NET host consuming excessive memory, have been noted.

Suggestions for improvement include refining the user experience, such as displaying only references when searching within the source code. Despite these challenges, users appreciate the extension's functionality and express gratitude for the development team's efforts.

Looking forward, the official launch of the Unity extension signifies the initiation of ongoing improvements. The development team states the commitment to follow and incorporate user feedback, prioritizing enhancements focused on improving performance, and reliability, and introducing new features for Unity development within VS Code.

To effectively utilize the extension, developers must ensure they meet the following requirements: Unity 2019 LTS or a newer version, an activated C# Dev Kit Extension in Visual Studio Code, a .NET 7 SDK or a later version (which will be installed by the C# Dev Kit extension if necessary), and the Visual Studio Editor Unity package version 2.0.20 or a more recent iteration.

Users are encouraged to actively participate by reporting new issues via VS Code or contributing to existing enhancements and issues, thereby aiding in the prioritization of improvements.

About the Author

Rate this Article