Unity Tutorial - 3D Spinning Cube in 10 minutes

Create a Unity project

To begin, let's create a 3D Unity project:

  1. On Unity Hub, select Projects from the left menu.

  2. Select the New button on the top-right corner.

    Unity Hub New project button

    The Create a new project with Unity dialog appears.

  3. Select the 3D template and name the project 3DCube. If you'd like to change where the project will be saved, change the Location settings. Then, select the Create button.

    Unity Hub prompt to choose a project type and name

    A new project is created and Unity opens when the project finishes loading.

  1. On Unity Hub, select Projects from the left menu.

  2. Select the New button on the top-right corner.

    Unity Hub New project button

    The Create a new project with Unity dialog appears.

  3. Select the 3D template and name the project 3DCube. Change the Location settings if you'd like to change where the project will be saved.
  4. Select the Create button. A new project is created and Unity opens when the project finishes loading.

    Unity Hub prompt to choose a project type and name

Set the default code editor in Unity

Once Unity loads your project, things should work as intended, but let’s check to see if Unity is using the correct installation of Visual Studio.

  1. On the menu bar, select Edit > Preferences.

    Unity's preferences under the Edit menu

    The Preferences dialog appears.

  2. Select the External Tools tab. From the External Script editor drop-down list, choose Visual Studio 2019.

    Unity's preferences dialog window with Visual Studio 2019 chosen as the external editor

    If you're not seeing Visual Studio 2019 on the list, select Browse on the drop-down list and locate your Visual Studio 2019 installation. The Visual Studio Community edition is typically found under %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\IDE or %ProgramFiles%\Microsoft Visual Studio\2019\Community\Common7\IDE.

  1. On the menu bar, select Unit > Preferences.

    Unity's preferences under the Unity menu

    The Preferences dialog appears.

  2. Select the External Tools tab. From the External Script editor drop-down list, choose Visual Studio.

    Unity's preferences dialog window with Visual Studio 2019 chosen as the external editor

Continue