Unity development on macOS with Visual Studio Code
I published this article some time ago and Unity environment changed a lot. I wouldn’t recommend this path nowadays. Just download Visual Studio Community, switch default Unity IDE and enjoy very smooth integration.
First things first — I’m not an experienced game developer. I just started my journey with Unity not long time ago and this article is a result of my early explorations that can be useful for newcomers.
Visual Studio Code and C# extension
You can download VSCode from Microsoft website for free. Installation process is very straight forward. Out of the box it doesn’t support a language used by Unity — it can be easily solved by installing C# extension from official marketplace.
Unity and it’s external script editor
Despite the time that it takes to download, Unity set up isn’t scary. I just would like to point your attention to the step where you can choose addition components that are going to be added during the installation process. As we are aiming to use it with Visual Studio Code, you can un-check MonoDevelop from the list of add-ons.
Now you can go to the Unity settings and change your “External Script Editor” to Visual Studio Code.
Install .NET SKD
Command Line Interface for the .NET Software Development Kit is something that we need. Download the latest version of the installer from Microsoft website and follow the installation guide.
Brew and Mono
Mono is the last ingredient that we need to install to have a smooth integration with VSCode OmniSharp. The easiest way is to download it from Homebrew. If you don’t have it installed on your machine, you live your life wrong! Visit a website to the missing package manager for macOS and follow the installation guide. Now the only thing that you need to run is…
brew install mono
VSCode + Unity = <3
There seem to be a lot of steps but actual the whole setup takes just a few minutes. You can now enjoy smooth integration of Unity and your favourite code editor.