As of August 2024, Microsoft no longer supports Visual Studio Community on Mac OS computers. This has a direct impact on MacOS users of the Unity game development platform, leading to a renewed interest in Visual Studio Code as an alternative IDE. Let's explore how Visual Studio Code can be used by both Windows and Mac OS users as a script editor.
Immediate Impact
CompuScholar's popular Unity Game Programming course documents how to use Visual Studio Community as the default script editor. Mac OS students who have already installed and are successfully using the Community IDE can likely continue to do so. However, you will not be able to update the software. New or existing Mac OS students who want to install a development environment on a new Mac OS computer must use Visual Studio Code instead!
CompuScholar's Unity installation guides in the Chapter 1 Activity Instructions have already been updated to show how Mac OS users will install Visual Studio Code instead of Visual Studio Community. Windows users will continue installing Visual Studio Community by default, but can optionally install and use Visual Studio Code if desired.
Unity and Visual Studio Community - Install Instructions for Windows
Unity and Visual Studio Code - Install Instructions for Mac OS
While a few key lessons and screenshots have been updated to reflect the Visual Studio Code option, most of the lessons in the 2024-2025 edition of the course will continue demonstrating Visual Studio Community. You can use Visual Studio Code to do the same things, but the user interface within the Visual Studio Code environment will be slightly different. Fortunately, the concepts are still the same, you may just need to find commands and features in slightly new locations within the VS Code environment.
The forthcoming 2025-2026 edition of the Unity Game Programming course will more fully incorporate the Visual Studio Code IDE option. It will also likely incorporate the recently announced Unity Version 6!
Visual Studio Code Installation
Both Windows and Mac OS users can easily install and use Visual Studio Code as a Unity C# script editor. The installation guide linked above for Mac OS users contains step-by-step instructions. Windows users can simply go to https://code.visualstudio.com/, click on the "Download" button, and download the installation setup executable for Windows. Run the setup program to get a basic Visual Studio Code installation on your computer in just a few minutes.
The basic IDE alone is not enough - you must install two extensions to get C# language support and support for the Unity IDE. Launch VS Code and click on the "Extensions" tab near the left. Then, find and install the "C#" extension for base language support and the "Unity" extension to integrate VS Code with Unity. Both extensions are certified Microsoft products.
After that, you simply need to configure the Unity IDE to use Visual Studio Code as your default script editor. Launch any Unity project, then look under Preferences and External Tools. You should be able to select "Visual Studio Code" in the drop-down next to the "External Tool Option".
Installation Nodes:
- We recommend upgrading to the latest version of Unity 2022.X before starting the VS Code installation. (We don't have any experience with Unity v6 yet!)
- Make sure to halt/exit all Unity IDE instances and the Unity Hub before starting your VS Code installation.
Once these simple steps are complete, you're all set. Double-clicking on a C# script asset in a Unity project will automatically launch Visual Studio Code. From this IDE, you can edit scripts, find/fix syntax errors, set breakpoints, establish a debugger connection to Unity, etc. VS Code works very much like VS Community!
For More Information
Check out our October 2024 Professional Development Webinar - "Using Visual Studio Code with Unity" - for further discussion and a video walk-through of VS Code installation and a demonstration of basic features, including debugging! As always, please Contact Us if you have questions!