By Ivan Santos - Thu Apr 07 2022

Install Unity on MacOS Big Sur

Installing Unity is relatively straightforward, but it does have some gotchas. Below are the steps I have followed to install Unity on my M1 machine.

I have embarked on my journey to become an indie game dev. As in my previous post, I was not planning on making a game just yet. However, I talked to a couple of friends, and they were interested in creating a game someday. And I said, why not learn now? Learning alongside other people makes the experience much more fun, in my opinion. I picked Unity as a game engine because it is the most popular free game engine. It supports both 2D and 3D games, and I can port the game into multiple platforms (I think…).

But anyway, it took me a few Google searches to install so that everything works. So I decided to create this post if anyone finds this helpful.

Installing Unity Hub + Unity Editor

You can download Unity Hub for Mac from https://unity.com/download#how-get-started.

Unity Hub is needed to install the Unity Editor. The hub manages the different versions of Unity that you might need to install. It also manages the projects so you can load the various versions of the editor.

Once Unity Hub is installed, you will need to download a Unity version. Go to Installs -> Install Editor -> 2021.2.18f1 [Silicon]. If you are not using the M1 chip, select the [Intel] version. Here you will also see several modules. Make sure to select Visual Studio.

Configuring Unity Editor to use VS Code for C# scripts

Open Unity Editor by creating a new project. Go to Preferences -> External Tools -> External Script Editor -> select Visual Studio Code. Also, ensure all checkboxes under Generate .csproj files are selected as below.

You need to generate the files for VS Code IntelliSense to work.

Install C# & Mono

You need to make sure you have .NET Framework installed on your machine.

You can install it via homebrew:

Make sure to install the SDK and not just the runtime ;)

The VS Code page for Unity Development (official page) recommends installing Mono. My experience is that without it, Intellisense did not work. You can install it by going to Mono’s official page.

Install + Configure C# Plugin in VSCode

And lastly, you will need to install the C# plugin in VSCode. Once installed, configure Omnisharp to use the Mono we installed in the previous step. Go to VSCode -> Code -> Preferences -> Settings -> Search “global mono” -> Set “Use Global Mono” to “always” -> Restart Omnisharp (blue button in popup message at bottom)

And now, IntelliSense should be working!

It is not perfect, as I still have auto-complete issues when overriding methods, but at least some stuff works.

I hope this helps you out. See you at the next one!

Edit: I found out how to make the override methods auto-complete. You need to install another VS Code extension:

And now it recommends methods to me :)