Skip to main content

Lab 2 - New Project with Primitives

1.Create a new Unity Project and rename your scene 

"Just like we did with the Prototype, the first thing we need to do is create a new blank project "

  1. Create a new Unity project called “Personal Project” using the 3D template and setting the location to the “Create with Code” folder
  2. After Unity opens, select your custom Layout
  3. In the Project window, Assets > Scenes, rename “SampleScene” to “My Game”

2.Create a background plane

"To orient yourself in the scene and not feel like you’re floating around in mid-air, it’s always good to start by adding a background / ground object"

  1. In the Hierarchy, Right-click > 3D Object > Plane to add a plane to your scene
  2. In the Plane’s Inspector, in the top-right of the Transform component, click on the three dots icon > Reset
    1. Note: the three dots will appear as a gear icon in older versions of Unity.
  3. Increase the XYZ scale of the plane to (5, 1, 5)
  4. Adjust your position in Scene view so you have a good view of the Plane

3.Create primitive Player with a new material

    "Now that we have the empty plane object set up, we can add the star of the show: the player object"

  1. In the Hierarchy, Right-click > 3D Object > Sphere, then rename it “Player
  2. In Assets, Right-click > Create > Folder named “Materials
  3. Inside “Materials”, Right-click > Create > Material and rename it “Blue
  4. In Blue’s Inspector, click on the Albedo color box and change it to a blue
  5. Drag the material from your Assets onto the Player object

4.Position camera based on project type

   "Now that we have the player in there, we need the best view of it, depending on our type of project"

  1. For a top-down game, position the camera at (0, 10, 0) directly over the player and rotate it 90 degrees on the X axis
  2. For a side-view game, rotate the Plane by -90 degrees on the X axis
  3. For an third-person view game, move the camera up on the Y and Z axes and increase its rotation on the X axis

5.Enemies, obstacles, projectiles & materials

    "Now that we know how to make primitives, let’s go ahead and make one for each object in our project"

  1. In the Hierarchy, create new Cubes, Spheres, and Capsules for all other main objects, renaming them, repositioning them, and scaling them
  2. In your Materials folder, create new materials for as many colors as you have unique objects, editing their color to match their name, then apply those materials to your objects
  3. Position all of your objects in locations relative to each other that make sense

6.Export a Unity Package backup file

    "Since we’re going to be putting our hearts and souls into this project, it’s always good to make backups"

  1. Save your Scene
  2. In the Project window, Right-click on the “Assets” folder > Export Package, then click Export
  3. Create a new “Backups” folder in your Personal Project folder, then save it with your name and the version number (e.g. Carl_V0.1.unitypackage”)

7.Lesson Recap

New progress
  • New project for your Personal Project
  • Camera positioned and rotated based on project type
  • All key objects in scene with unique materials
New concepts & skills:
  • Primitives
  • Create new materials
  • Export Unity packages