Getting started with Unity 2020

If you don’t have Unity installed already, or are running an earlier version, you'll need to do a little setup. Follow these steps:

  1. Head over to https://www.unity.com/.
  2. Select Get Started (shown in the following screenshot), which will take you to the Unity store page:

If the Unity home page looks different for you than what you can see in the preceding screenshot, you can go directly to https://store.unity.com.

Don't feel overwhelmed by this – you can get Unity completely free!

  1. Click the Inpidual tab and select the Personal option on the left. The other paid options offer more advanced functionality and services subscribers, but you can check these out on your own:

After selecting the personal plan, you'll be asked if you're a first-time or returning user.

  1. Select Start here under First-time Users: 
  1. Select Agree and download to get your copy of Unity Hub:

Once the download is complete, follow these steps: 

  1. Open up the package (by double-clicking it).
  2. Accept the user agreement.
  3. Follow the installation instructions. When you get the green light, go ahead and fire up the Unity Hub application! You'll see the following screen:

The newest version of Unity Hub has a wizard or getting started path when you first open the application. If you'd like to follow that, feel free. The following steps show you how to start a new project without any help from the application since that's only available on the first launch.

  1. With Unity Hub open, switch to the Installs tab from the left-hand menu and select ADD:

At the time of writing, Unity 2020 is still in its Alpha phase, but you should be able to select a 2020 version from the Latest Official Releases list:

You won't need any specific platform modules to follow along with future examples, so go ahead and leave this as-is. If you do want to add them at any time, you can click the More button (three-dot icon) at the upper right of any version in the Installs window:

When the installation is complete, you'll see a new version in your Installs panel, as follows:

You can find additional information and resources about the Unity Hub application at https://docs.unity3d.com/Manual/GettingStartedInstallingHub.html.

There's always a chance of something going wrong, so be sure to check the following section if you're using macOS Catalina or higher. 

Using macOS 

If you're working on a Mac with OS Catalina or later, there is a known issue with using Unity Hub 2.2.2 (and earlier versions) to install Unity with the preceding steps. If that's the case for you, take a deep breath and go to the Unity download archive and grab the version you need (https://unity3d.com/get-unity/download/archive). Remember to use the Downloads (Mac) option instead of the Unity Hub download:

If you're working on Windows and run into similar install issues, the steps we just took will also work just fine.

The download is a normal application installer since it's a .dmg file. Open it up, follow the instructions, and you'll be ready to go in no time!

All of the examples and screenshots for this book were created and captured using Unity 2020.1.0a20. If you're using a newer version, things might look slightly different in the Unity editor, but this shouldn't affect you following along.

Now that Unity Hub and Unity 2020 are installed, it's time to create a new project!

Creating a new project

Launch the Unity Hub application to start a new project. If you have a Unity account, go ahead and sign-in; if not, you can either create one or hit Skip at the bottom of the screen.

Now, let's set up a new project by selecting the arrow icon next to the NEW tab at the top-right:

Choose your 2020 version and set the following fields:

  • Project Name: I'll be calling mine Hero Born.
  • Location: Wherever you'd like the project to be saved.
  • Template: The project will default to 3D, so hit CREATE:

With the project created, you're all set to explore the Unity interface.

Navigating the editor

When the new project finishes initializing, you'll see the glorious Unity Editor! I've marked the important tabs (or panels, if you prefer) in the following screenshot:

This is a lot to take in, so we'll look at each of these panels in more detail:

  1. The Toolbar panel is the topmost part of the Unity editor. From here, you can manipulate objects (far-left button group) and play and pause the game (center buttons). The rightmost button group contains Unity Services, layer masks, and layout scheme features, which we won't be using in this book.
  2. The Hierarchy window shows every item currently in the game scene. In the starter project, this is just the default camera and directional light, but when we create our prototype environment, this window will start to get filled in.
  3. The Game and Scene views are the most visual aspects of the editor. Think of the Scene view as your stage, where you can move and arrange 2D and 3D objects. When you hit the Play button, the Game view will take over, rendering the Scene view and any programmed interactions.
  4. The Inspector window is your one-stop-shop for viewing and editing the properties of your objects. If you select the Main Camera component, you'll see several parts (Unity calls them components) are displayed – all of which are accessible from here.
  1. The Project window holds every asset that's currently in your project. Think of this as a representation of your project's folders and files.
  2. The Console panel is where any output we want our scripts to print will show up. From here on out, if we talk about the console or debug output, this panel is where it will be displayed.

You can find more in-depth breakdowns of each window's functionality in the Unity docs at https://docs.unity3d.com/Manual/UsingTheEditor.html.

I know that was a lot to process if you're new to Unity, but rest assured that any instructions going forward will always reference the necessary steps. I won't leave you hanging or wondering what button to push. With that out of the way, let's start creating some actual C# scripts.