Lesson 1.1 - Start your 3D Engines
1 Hour20 Mins
For Educators
In this lesson, you will create your very first game project in Unity Hub. You will choose and position a vehicle for the player to drive and an obstacle for them to hit or avoid. You will also set up a camera for the player to see through, giving them a perfect view of the scene. Throughout this process, you will learn to navigate the Unity Editor and grow comfortable moving around in 3D Space. Lastly, you will customize your own window layout for the Unity Editor.
Project Outcome:
You will have a vehicle and obstacle positioned on the road and the camera set up perfectly behind the vehicle. You will also have a new custom Unity layout, perfectly optimized for editing.
Recommended Unity Versions
2018.4 and Above
Lesson 1.1 - Start your 3D Engines

Make a course folder and new project
The first thing we need to do is create a folder that will hold all of our course projects, then create a new Unity project inside it for Prototype 1.

  1. On your desktop (or somewhere else you will remember), Right-click > create New Folder, then name it “Create with Code
  2. Open Unity Hub and click New
  3. Name the project “Prototype 1”, select the correct version of Unity, set the location to the new “Create with Code” folder, and select the 3D template
  4. Click Create Project, then wait for Unity to open

Import assets and open Prototype 1
Now that we have an empty project open, we need to import the assets for Prototype 1 and open the scene

  1. Click on one of the links to access the Prototype 1 starter files, then download and import them into Unity
  2. In the Project window, in Assets > Scenes > double-click on the Prototype 1 scene to open it
  3. Delete the Sample Scene without saving
  4. Right-click + drag to look around at the start of the road

Add your vehicle to the scene
Since we’re making a driving simulator, we need to add our own vehicle to the scene.

  1. In the Project Window, open Assets > Course Library > Vehicles, then drag a vehicle into the Hierarchy
  2. Hold right-click + WASD to fly to the vehicle, then try to rotate around it
  3. Press F in the Scene view to focus on it, then use the scroll wheel to zoom in and out and hold the scroll wheel to pan
  4. Press F to focus on it, hold alt+left-click to rotate around it perfectly
  5. If anything goes wrong, press Ctrl/Cmd+Z to Undo until it’s fixed

Add an obstacle and reposition it
The next thing our game needs is an obstacle! We need to choose one and position it in front of the vehicle.
  1. Go to Course Library > Obstacles and drag an obstacle directly into scene view
  2. In the Inspector for your obstacle, in the top-right of the Transform component, click the Gear Icon > Reset Position
  3. In the Inspector, change the XYZ Location to 0,0,25
  4. In the hierarchy, Right-click > Rename your two objects as “Player” and “Obstacle

Locate your camera and run the game
Now that we’ve set up our vehicle and obstacle, let’s try running the game and looking through the camera.

  1. Select the Camera in the hierarchy, then press F to focus on it
  2. Press the Play button to run your Game, then press Play again to stop it

Move the camera behind the vehicle
In order for the player to properly view our game, we should position and angle the camera in a good spot behind the vehicle

  1. Use the Move and Rotate tools to move the camera behind the vehicle looking down on it
  2. Hold Ctrl/Cmd to move the camera by whole units

Customize the interface layout
Last but not least, we need to customize the Unity Editor layout so that it’s perfect for editing our project.

  1. In the top-right corner, change the layout from “Default” to “Tall”,
  2. Move Game view beneath Scene view
  3. In the Project window, click on the little drop-down menu in the top-right and choose “One-column layout”
  4. In the layout Dropdown, save a new Layout and call it “My Layout

Lesson Recap

New Functionality
  • Project set up with assets imported
  • Vehicle positioned at the start of the road
  • Obstacle positioned in front of the vehicle
  • Camera positioned behind vehicle
New Concepts & Skills
  • Create a new project
  • Import assets
  • Add objects to the scene
  • Game vs Scene view
  • Project, Hierarchy, Inspector windows
  • Navigate 3D space
  • Move and Rotate tools
  • Customize the layout
Next Lesson
  • We’ll really make this interactive by writing our first line of code in C# to make the vehicle move and have it collide with other objects in the scene