Download Computer Science lecture note and more Lecture notes Computer Science in PDF only on Docsity!
Game Development
Spring 2018
Tutorial: Overview of
Unity
Unity Download Assistant The Unity Download Assistant is a small executable program (approximately 1 MB in size) which lets you select which components of the Unity Editor you want to download and install.
Hierarc hy Scene Inspect or Project
Game
- Open Unity **Setting up the project
- Creating a new project** a. File -> new project b. Name it, save it on desktop
- Search for the assets “Space Shooter Tutorial” and click on the results
- Download the assets
Setting up the project
4. Importing assets (make sure to select all)
Setting up the project
**5. Select scene
- Save scene** a. Note “untitled” at top b. File -> save scene as c. Create a directory _scene d. Save the scene as “main” in this directory
The player GameObject
- Setting up the Player GameObject using mesh models, colliders and other built-in components a. Select scene b. Select Models c. Drag player ship onto the scene
The player GameObject
- Setting up the Player GameObject using mesh models, colliders and other built-in components a. Select scene b. Select Models c. Drag player ship onto the scene
The player GameObject
- Focus on the player a. Click on it b. Rename it (“player”) c. Place player at origin (0,0,0) i. Click ii. Reset d. Transform a. Where b. Direction c. Scale
The player GameObject
- Focus on the player
- Components a. To perform specialized functions b. Creating new components c. Physics to govern the physics laws i. Motion ii. Collision (rigid bodies) d. Add a rigid body a. Add component -> Physics -> Rigid body b. Component “Rigid Body” is created
The player GameObject
- Focus on the player
- Components a. Add component -> Physics -> Rigid body b. Component “Rigid Body” is created c. Deselect “use gravity” d. Collision Volume i. Add component -> Physics -> Capsule Collider ii. Adjust the capsule to cover the player 1. Change direction to Z 2. Slide to increase the height 3. Slide to decrease the radius
The player GameObject
- Focus on the player
- Components a. Add component -> Physics -> Rigid body b. Component “Rigid Body” is created c. Deselect “use gravity” d. Collision Volume i. Add component -> Physics -> Capsule Collider ii. Adjust the capsule to cover the player iii. Top view to get a better feel of the volume i. Click on the Y of the Gismo to get a top view e. Collision will trigger an event, so check the “Is Trigger” f. From Prefab add player engine in the hierarchy under player