Make Mobile VR Games in Unity with C# for Google Cardboard
4.6 (1,484 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
12,697 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Make Mobile VR Games in Unity with C# for Google Cardboard to your Wishlist.

Add to Wishlist

Make Mobile VR Games in Unity with C# for Google Cardboard

Learn to code in .NET's C# from scratch. Make virtual reality games in Unity. Google Daydream for Cardboard.
Bestselling
4.6 (1,484 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
12,697 students enrolled
Last updated 4/2017
English
Current price: $10 Original price: $95 Discount: 89% off
1 day left at this price!
30-Day Money-Back Guarantee
Includes:
  • 14.5 hours on-demand video
  • 1 Article
  • 6 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Choose between the current major VR systems.
  • Write basic C# code, even with no prior experience.
  • Create a simple 3D game in Unity.
  • Design games for Virtual Reality.
  • Create a Google Cardboard VR game from scratch.
View Curriculum
Requirements
  • Google Cardboard Viewer + 6" or smaller Android or iOS device
  • Android 4.1 / iOS 8 or heigher
  • A phone compatible with your Cardboard viewer (gyroscope commonly required)
  • Access to a Mac (and XCode if building to iOS devices).
  • A Mac or PC capable of running Unity.
  • OPTIONAL: Oculus Rift DK2 or CV1.
Description

After a false-start in the 1980s, it's finally time for VR to shine. Facebook famously bought Oculus for $2bn in 2014, and now several major headsets are on the market (Oculus Rift, Sony's PlayStation VR, HTC Vive and more). This course is focused on mobile VR, which has a huge uptake via Google Cardboard and Gear VR.

Major game engines such as Unity and Unreal are now supporting VR, and the computer power required to drive VR is finally affordable. Today we have some great platforms to work with including Oculus Rift, Google Project Cardboard, and Samsung Gear VR.

Access to this course comes with an optional, free community site where you can share games and 3D models, as well as connect with 1000s of other friendly students.

What Will I Learn?

You will learn about the current VR offerings, explore their fundamental capabilities and requirements. You'll then learn basic coding in C#, and brush-up your vector maths. From there we'll build Shoot Hoop, which as a bonus is Oculus Rift compatible. Finally we'll make a fun game for Google Project Cardboard  - all using the free game development software Unity.

This course is for beginner to intermediate students of Unity and C#. No prior programming or Unity knowledge is required, and any experience you have will only help.

The free game engine Unity has the largest market share in indie games for a reason, it's modern and easy to use

Why Learn This Now?

All these new devices will need apps, and there's only one chance to be first in a particular space. Furthermore there are already millions (yes millions) of existing owners of Cardboard devices, and early Oculus Rift orders are very strong.

Please note that to build to iOS devices for Google Cardboard you will need access to a Mac running a recent version of XCode. We're are focused on mobile VR for iOS and android. An Oculus Rift is optional, but not required for the course. Hand controllers are not currently covered in the course.

In addition you can re-apply your knowledge to create apps for both the iOS and Android app store, which already have hundreds of VR apps. Now is just the right time to join them.

Who Are You To Teach Us?

Ben has already co-created the most popular game development courses on Udemy. Sam is a highly qualified computer scientist from Cambridge University. We're confident that we can help you build the skills in VR you need to get started.

The VR wave is about to come in, and I'd love you to be on it with us.

Samuel Pattuzzi & Ben Tristem

Who is the target audience?
  • Complete beginners to programming.
  • Students with no prior Unity knowledge.
  • C# programmers transferring to VR.
  • Unity Developers wanting to get ahead of the game.
  • This course is NOT yet ideal for advanced developers looking to deploy to PlayStation VR, or HTC Vive.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 93 Lectures Collapse All 93 Lectures 14:15:57
+
Introducing VR & Comparing Devices
7 Lectures 27:22

How to Share in the Discussions
00:17

  • Get hold of a Google Cardboard
  • Start installing or upgrading to Unity 5.2
  • Say “hi” in the discussions

Please view and comment on live section notes using the attached link. You can download the latest version as a PDF from Google Slides if you wish.

Preview 01:23

  • The top 5 VR platforms
  • Compare strength and weaknesses
  • Understand basic VR terms
The Top 5 VR Platforms Compared
10:18

  • We have many different skill levels.
  • You don’t have to start at the beginning.
  • How to find where to start.

(Unique Video Reference: 2b_IS_UVR)

Where to Dive in
02:47

  • Installing Unity 5.3.
  • Opening the Editor for the first time.
  • Installing Visual Studio.
Installing Unity
09:09

Section End QUIZ
4 questions

  • Congratulations, the hard work’s done.
  • We overviewed the VR landscape.
  • Apple now have a free developer account tier.
  • We get into actual development next!
  • Share in discussions iOS OR Android?
Section 1 Wrap-Up
00:59
+
Go Home - Programming in C#
18 Lectures 02:37:48
  • You'll be learning basic C# in this section
  • We'll be focusing on vector manipulation
  • Vectors are used a lot in VR development
  • You'll have a fun little game at the end.
    Please view and comment on live section notes using the attached link. You can download the latest version as a PDF from Google Slides if you wish.
"Go Home" Game Introduction
01:11

  • Create a rough plan.
  • Define the user’s “problem”.
  • Brainstorm concept, rules & requirements.
  • Document possible future ideas.
Game Design Document
05:08

  • Introduction to the Unity Editor.
  • Where to find the Console.
  • Editing scenes in Unity.
  • What is a C# script.
  • Creating C# scripts in Unity.
Scripts in Unity
08:49

  • Attaching scripts to GameObjects.
  • Anatomy of program lines.
  • How to write print statements.
  • Renaming scripts
Preview 11:28

  • Planning software with pseudo code.
  • Defining and assigning variables.
  • Printing variables with text.
  • Introduction to types.
Declaring and Assigning Variables
14:10

  • Adding and subtracting variables.
  • Using +, -, / and * operators on variables.
  • Mixing types in operations.
  • Printing text inline with numbers.
Math Operations on Variables
09:00

  • Reviewing the types of variables.
  • How to use booleans and their operators.
  • Conditional execution with if statements.
  • Reacting to different conditions.
Booleans and if statements
13:40

Mid-section Quiz
10 questions

  • Congratulations on the first quiz!
  • Reviewing what’s gone so far.
  • How to revise and consolidate.
  • Checking your code against GitHub.
Recapping the Basics
01:06

  • What is a method or function.
  • Getting input from the keyboard.
  • Using the Update() method.
  • Learning to search the Unity documentation.
Methods and User Input
10:56

  • Understand what a vector is.
  • Adding/subtracting vectors.
  • Using vectors to calculate a path home.
Vectors for Position and Movement
06:52

  • Understand Classes versus Objects.
  • Learn how to use the Vector2 type.
  • Finding the magnitude of a vector.
Preview 11:23

  • How to declare variables in a class.
  • How method declarations look.
  • Sharing variables between methods.
  • Editing variables in the inspector.
Declaring Your Own Classes
12:41

  • How variables can be overwritten.
  • Updating our vector position.
  • Recalculating our distance from home.
Updating Shared Variables
09:25

Mid-section Quiz
9 questions

  • Yet another quiz down.
  • Reviewing objects, classes and methods.
  • How to revise and consolidate.
  • Ask questions in the Q&A and forums.
Recapping Objects, Classes and Methods
00:50

  • Understand the DRY principle.
  • How to write our own methods/functions.
  • Calling methods.
  • Introduction to refactoring.
Don’t Repeat Yourself with Functions
16:49

  • Understanding the structure of programs.
  • Learning the programming jargon.
  • Statements vs Expressions.
  • Functions and execution flow.
  • The components of a class.
How to Speak Like a Programmer
13:13

  • Rubber Duck Debugging.
  • Fix our first bug.
  • Introduce play testing.
Debugging Small Programs
10:23

End of section Quiz
8 questions

  • Congratulations on finishing your 1st section
  • You've build a foundation of coding skills
  • Please try varying a the game a little
  • Why not start the next section right-away?
Section 2 Wrap-Up
00:44
+
Shoot the Hoop - 3D Game
29 Lectures 03:54:09
  • Your first 3D game
  • No VR device is required
  • Cardboard and Rift are optional

Please view and comment on live section notes using the attached link. You can download the latest version as a PDF from Google Slides if you wish.

Preview 01:12

  • We review the GDD format.
  • Brainstorm Concepts, Rules and Requirements.
  • Outline the scope for the section.
Game Design Document Recap
03:10

  • Introduction to the Unity Editor.
  • Adding 3D objects to a scene.
  • Moving, Scaling and Rotating.
  • Previewing our work.
Creating a 3D Scene
09:13

  • Introduction to Components.
  • Using the inspector.
  • Adding Rigidbody physics.
  • Making objects collide.
  • Playing with physics.
Rigidbody Physics
06:19

  • Brief introduction to materials.
  • Prefabs as linked copies.
  • Overriding prefab values.
  • Reverting prefab values.
Smart Copies with Prefabs
07:04

  • Creating instances programmatically.
  • The Instantiate() function.
  • Recap of if statements and GetKeyDown().
Instantiating Prefabs in Code
08:12

  • Accessing components in code.
  • Return values of functions.
  • GetComponent<>() function.
  • Adding velocity to a Rigidbody.
Adding Velocity to the Ball
09:49

  • Rotating the camera.
  • Updating transform.rotation.
  • The Quaternion type.
  • Quaternion multiplication and rotation.
Rotating the Camera in Code
07:43

  • The Unity InputManager settings.
  • Using Input.GetAxis().
  • Updating our rotation based on mouse input.
Taking Mouse Input
06:04

  • Understanding rotation behaviour.
  • Parenting game objects.
  • Avoiding camera tilt in mouse look.
  • Creating a camera gimbal.
Creating a Camera Gimbal
08:19

  • Accessing components of child objects.
  • Correct script placement in a hierarchy.
  • Global rotation vs localRotation.
Controlling the Camera Gimbal
09:16

  • Refactoring the BallSpawner script.
  • Setting the spawn position for prefabs.
  • Exposing fields to the designer.
Setting the Ball Spawn Location
10:35

Mid-section Quiz
10 questions

  • Recapping rotations.
  • Rotations and vectors.
  • Calculating the “look direction”.
Getting the Look Direction
07:14

  • Collision components.
  • Introducing OnCollisionEnter().
  • Starting to keep score
Collisions in Code
08:08

  • Creating a central score keeper.
  • Finding components globally.
  • Introduction to public methods.
  • Getting objects with FindObjectOfType<>().
Keeping Score Globally
12:51

  • Organising multiple scenes.
  • Understanding scene buildIndex.
  • Loading levels in code.
Using Multiple Scenes
09:10

  • Introducing the UI canvas.
  • Adding background images.
  • Finding uncopyrighted images.
  • Dealing with multiple screen sizes.
Creating Menu Screen UI
10:31

  • How to find suitable fonts.
  • Adding text to UI canvas.
  • Importing fonts into Unity.
UI Text and Fonts
07:39

  • Adding and styling UI buttons.
  • Connecting UI buttons to objects.
  • Calling code OnClick.
  • Writing LoadPreviousScene().
UI Buttons and Code
08:32

  • Introducing Time.deltaTime.
  • How to implement a timer.
  • Creating a default of no progression.
Timing and Triggering Events
08:19

  • Separation of presentation and data.
  • Updating UI text in code.
  • Creating a HUD.
  • Testing multiple screen resolutions.

Updating UI Text to Show Score
13:32

  • GameObject lifetime in scenes.
  • Introduction to DontDestroyOnLoad().
  • Ending the lifetime manually.
  • Displaying the score on game over.
Persisting Data Between Scenes
10:53

Mid-section Quiz
10 questions

  • Installing the Oculus SDK.
  • Enabling VR support in Unity.
  • Converting an existing project to VR.
Converting to Oculus Rift
04:58

  • Putting UI in World Space.
  • Scaling and positioning UI canvases.
  • Creating prefabs to avoid duplication.
UI for the Oculus Rift
08:37

  • Importing Unity asset packages.
  • Making our scene look beautiful.
  • Playtesting the game for difficulty.
Importing Assets to Build Levels
09:46

  • Triggers and OnTriggerEnter().
  • Writing a script from scratch.
  • Revising script communication.
  • Detecting baskets properly.
Preview 13:32

  • Adding Audio Sources in Unity.
  • Properties of Audio Sources.
  • Autoplaying and looping music.
Audio and Music
05:02

  • Audio Source components.
  • Triggering SFX in code.
  • The AudioSource.Play() method.
Triggering Sounds in Code
07:36

End of section Quiz
6 questions

  • Congratulations
  • What you learnt in this section
  • Share your creation with other students
Section 3 Wrap-Up
00:53
+
Squashy Toad - Google Cardboard
37 Lectures 07:13:03
  • Setup Android Studios.
  • Locating the SDK and JDK.
  • Installing the Android SDK.
  • Enabling your phones developer mode.
Becoming an Android Developer
12:34

  • Connecting the SDK to Unity.
  • Installing Unity modules individually.
  • Build the Google Cardboard Demo.
  • Deploy to your Android phone.
Building an Unity Android Project
10:11

Android Quiz
3 questions

  • Setup XCode.
  • Configuring an iOS app to deploy.
  • Signing Identities and Provisioning Profiles
  • Deploying your first app.
Becoming an iOS Developer
10:30

  • Setup your environment.
  • Build an empty project.
  • Setting your bundle identifier in Unity.
  • Deploy to your iOS phone.
Building an Unity iOS Project
08:43

iOS Quiz
3 questions

  • Create a virtual environment.
  • Overview of the Google VR stack.
  • Add stereoscopic cameras to games.
  • Push to your device.
Setup a VR Camera
07:53

  • Setting font size and DPI.
  • Where to scale a Rect Transform.
  • Create UI in VR environments.
  • Position and scale for comfort.
UI in VR Environments
13:18

  • Activating UI with Gaze.
  • Revising event based UI.
  • Revising the scene management.
Preview 11:02

  • What is spatial audio?
  • How can we use it in a menu scene.
  • The GVR audio listener and source.
  • Enabling the spatializer plugin.
Google VR Spatial Audio Sources
08:48

  • Use physics simulation to hop.
  • Editing terrain in the Unity Editor.
  • Adjust rigidbody mechanics for sickness.
  • Tweak materials for frog behaviour.
  • Introducing physics materials.
Avoiding Motion Sickness
11:16

  • Projecting vectors onto planes.
  • Rotating and normalizing vectors.
  • Drawing debug lines in Unity.
Debugging Vectors in Unity
13:27

  • Getting the look vector of the camera.
  • Sequencing vector operations.
  • Presenting an easy interface to the designer.
Advanced Vector Manipulation
12:21

  • Getting trigger input from GVR.
  • Using Physics.Raycast().
  • Preventing jumping unless grounded.
Jumping Only When Grounded
13:03

  • Creating a tile-based level.
  • Importing our assets.
  • Adding materials and textures.
Tile-based Terrain
17:22

Mid-section Quiz
10 questions

  • Creating lanes of traffic.
  • Generating random numbers.
  • Randomly selecting terrain.
  • Exposing terrain to the designer.
Procedurally Generated Terrain
17:08

  • Spawning a random number of trees.
  • Removing code repetition.
  • for and while loops.
Generating Infinite Terrain
09:29

  • How to scale Unity units.
  • Altering gravity acceleration.
  • Copying component values.
Scaling Down or Up
13:24

  • The problem with nested prefabs.
  • How to work around the problem.
  • Adding a collider to our tree.
Creating Nested Prefabs
13:52


  • Adding car prefabs to the road.
  • Giving them non-physical velocity.
  • Ensuring they can impact the toad.
  • Understanding Kinematic Colliders.
  • Creating a log prefab.
Moving Cars with Kinematic Colliders
15:31

  • Spawning cars with a time interval.
  • Spawning at a given location.
  • Randomizing the time interval.
Spawning Cars Randomly
11:26

  • Probability Density Functions 
  • Cumulative Distributions Functions
  • How to make any distribution in Unity
Understanding Bell Curves
12:32

  • What is a Poisson process.
  • Looking at the Exponential distribution.
  • Implementing the Exponential in Unity.
Simulating Random Traffic
11:59

  • Overview of FixedUpdate().
  • Understanding the physics engine cycle.
  • Making the logs carry the frog.
Moving Rigidbodies Smoothly
11:25

  • The issue with trigger-based grounding.
  • Why boolean grounding won’t work.
  • An explanation of count-based grounding.
  • Using this to fix jumping on moving platforms.
Count-based Grounding Checks
12:22

  • Recap for using arrays.
  • Array constant syntax.
  • Understanding array indexing and length.
  • Implementing multi-hop jumping.
Double and Triple Hop Jumping
08:52

Mid-section Quiz
10 questions

  • Rotations in Unity.
  • Euler angle definition of rotation.
  • Angle axis rotations.
  • The importance of rotation order.
Understanding 3D Rotation
13:40

  • An overview of the Quaternion class.
  • Creating rotations between 2 vectors.
  • Keeping the horizon level with LookRotation.
  • Rotating a cube to hover in-front of us.
Creating Rotations from Vectors
13:27

  • How to reload the current level.
  • Setting up the HUD UI.
  • Revising UI button binding.
HUD UI and Level Reload
11:54

  • Finding objects from anywhere in the scene.
  • How to notify death.
  • Fixing out multi-hop bug.
Lethal Objects and Death Notification
14:06

  • Disabling movement on death.
  • Adding a safe starting point.
  • Enabling/disabling the reticule.
Pausing Game Mechanics
08:49

  • Debugging performance slow downs.
  • Destroying old vehicles.
  • Triggers vs Colliders.
Garbage Collecting GameObjects
10:33

  • How to label “magic” numbers.
  • Preventing runs of dangerous lanes.
  • Enum types and when to use them.
Enums for Labeled Numbers
13:56

  • Using our Enum knowledge.
  • The Cursor API in Unity.
  • Locking the cursor to the screen.
Locking the Cursor
04:38

  • Introduction to the performance cycle.
  • How to display FPS in our game.
  • Getting a benchmark for performance.
  • Cutting down our game.
  • Disabling VSync.
Basic Performance Benchmarking
11:43

  • Common optimisations to try.
  • Using the iterative process.
  • Unity quality settings.
Performance Optimization Loop
08:49

Mid-section Quiz
10 questions

  • Using the Unity Profiler.
  • Profiler hierarchies.
  • Profiler timeline.
  • Diagnosing script issues.
Unity Profiler on Mobile
13:26

  • Revising spatial audio.
  • Creating immersive sound.
  • Adding audio to our level.
Challenge - Add Level Audio
09:10

  • Using a foreach loop.
  • How to get child transforms.
  • Spawning new lanes with a buffer.
  • Destroying lanes with a buffer.
  • Ideas for continuing the game.
Spawning and Destroying Lanes
10:24

End of section Quiz
3 questions
+
Resources & Next Steps
2 Lectures 03:36
  • What you’ve learnt so far…
  • You have got started with the Cardboard SDK.
  • Understood camera and gaze.
  • Started with UI in VR.
  • Made basic movement.
  • More content coming.
Course Wrap-up
01:11

In this video we introduce our other courses.

BONUS LECTURE - Our Other Courses
02:25
About the Instructor
Ben Tristem
4.7 Average rating
41,961 Reviews
217,614 Students
10 Courses
Best-selling Instructor, Game Developer, Online Entrepreneur

Hi, I'm Ben. I have a degree in computing from Imperial College London, and a physics diploma from the Open University.

I started working for myself at the age of 15, and never looked back. I explored careers as varied as being a commercial pilot, stunt-man, rock climbing instructor, and more. None of these provided a continued challenge, and stable income in the same way technology does.

After building and selling a home computer support business, I became an angel investor and business mentor here in Cambridge UK. I fell in love with teaching game development through one of my investments, and I now spend all of my time sharing my passion with people like you.

I can't wait to help you experience the fulfilment, and financial freedom, that having a deep understanding of technology brings.

So why not start learning to make games with me and my team now?

See you soon!

Ben

Sam Pattuzzi
4.7 Average rating
11,556 Reviews
71,681 Students
3 Courses
Software Engineer, University of Cambridge

I wrote my first game when I was 14 and ever since, programming has been a key part of both work and play in my life. I studied Computer Science at the University of Cambridge where I still teach undergraduates. When I'm not teaching, I'm a freelance software engineer and enjoy my work with tech start-ups and social businesses.

For me, Udemy is the opportunity to combine my passions for teaching and programming.