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 "
- Create a new Unity project called “Personal Project” using the 3D template and setting the location to the “Create with Code” folder
-
After Unity opens, select your custom Layout
-
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"
-
In the Hierarchy, Right-click > 3D Object > Plane to add a plane to your scene
- In the Plane’s Inspector, in the top-right of the Transform component, click on the three dots icon > Reset
- Note: the three dots will appear as a gear icon in older versions of Unity.
-
Increase the XYZ scale of the plane to (5, 1, 5)
-
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"
-
In the Hierarchy, Right-click > 3D Object > Sphere, then rename it “Player”
-
In Assets, Right-click > Create > Folder named “Materials”
-
Inside “Materials”, Right-click > Create > Material and rename it “Blue”
-
In Blue’s Inspector, click on the Albedo color box and change it to a blue
-
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"
-
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
-
For a side-view game, rotate the Plane by -90 degrees on the X axis
-
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"
-
In the Hierarchy, create new Cubes, Spheres, and Capsules for all other main objects, renaming them, repositioning them, and scaling them
-
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
-
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"
-
Save your Scene
-
In the Project window, Right-click on the “Assets” folder > Export Package, then click Export
-
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