Unityspaceshooter Course

A beginners guide to Unity focusing on making a virtual reality game for the worlds leading headset.

Last updated 2022-01-10 | 4.6

- Installing Unity Hub and the Unity Game Engine
- Navigating the Unity's user interface
- Importing and preparing 3D assets

What you'll learn

Installing Unity Hub and the Unity Game Engine
Navigating the Unity's user interface
Importing and preparing 3D assets
Getting Unity Ready for Virtual Reality a look at some Unity engine settings
Creating A Moon Base - Creative session! use provided assets to personalise your moon base
Lighting an environment using Unity directional lights
spotlights and baking
Setting up the VR Camera - using Unity's XR interaction toolkit
Take a look at the base in VR! - building to the Oculus Quest
Adding your hands - use C# combined with animator blend trees to control your hands.
Picking up your weapon - using Unitys XR interactions
Shooting your gun - an intro to C#
Using Unity's C# events system
Spawning the asteroids - coding in C# to instantiate objects into our scene
Creating a Game Manager
a C# class that looks after everything our game is doing.
C# static variables
C# Enums
Keeping track of your score - an intro to user interface in VR using Unitys canvas system
Shooting the Asteroids checking collisions in C# within the unity physics system
Creating a timer using C# to create a timer controlling play duration
How to optimise your game for the Oculus Quest
Occlusion Culling
Bug fixing
Post Processing
Particle System

* Requirements

* To experience the VR you will need an Oculus Quest/Rift/Rift S
* How to download and install software would be an advantage.
* A small understanding of Unity - *But not essential
* A basic grasp of maths will help with a little part of the timer coding - *But not essential
* A little knowledge of C# would help *but not essential

Description

  • Installing Unity Hub and the Unity Game Engine
  • Navigating the Unity's user interface
  • Importing and preparing 3D assets
  • Getting Unity Ready for Virtual Reality a look at some Unity engine settings
  • Creating A Moon Base - Creative session! use provided assets to personalise your moon base
  • Lighting an environment using Unity directional lights, spotlights and baking
  • Setting up the VR Camera - using Unity's XR interaction toolkit
  • Take a look at the base in VR! - building to the Oculus Quest
  • Adding your hands - use C# combined with animator blend trees to control your hands.
  • Picking up your weapon - using Unitys XR interactions
  • Shooting your gun - an intro to C#
  • Using Unity's C# events system
  • Spawning the asteroids - coding in C# to instantiate objects into our scene
  • Creating a Game Manager, a C# class that looks after everything our game is doing.
  • C# static variables
  • C# Enums
  • Keeping track of your score - an intro to user interface in VR using Unitys canvas system
  • Shooting the Asteroids checking collisions in C# within the unity physics system
  • Creating a timer using C# to create a timer controlling play duration
  • How to optimise your game for the Oculus Quest
  • Occlusion Culling
  • Bug fixing
  • Post Processing
  • Particle System

Course content

12 sections • 43 lectures

Course Overview Preview 00:38

Welcome to the course!

Installing Unity Hub and Unity Engine Preview 07:34

In this lesson, we'll visit Unitys website and download 'Unity Hub', an application that acts as a portal for your projects and engine versions.

You will then go about creating the project we will use for the remainder of this course.

First Look At The Unity User Interface Preview 06:17

This lesson will cover the basics of the user interface in Unity, showing you the essential windows and their role. We will then discuss the project pane and why it's important to organise our files.

Configuring Unity For XR And Switching To Android Settings Preview 09:31

Creating a virtual reality application for the Oculus quest requires Unitys build target to be changed.

We will be adding in the XR interaction toolkit 1.0.0 to our project using the package manager, and activate the XR plugin management featuring in project settings.

Create XR Camera rig, testing our Build Pipeline, Importing Art Package Preview 15:20

We will be creating a very simple scene to test out our build pipeline to the headset. Our scene will have the Device-based XR rig implemented then we will look at creating a build! following that we'll import our awesome free 3D assets!

Planning Our Game Preview 09:41

This lesson takes a look into planning. And how it can help to have a goal to work towards, and an attempt at locating any potential issues at an early stage.

Building The Moon Base Preview 20:45

This lesson focuses on the creation of our Moonbase, understanding way the 3D models are constructed into prefabs. This lesson also touches on some of the considerations for building a game for a mobile VR platform.

Adding The Skybox Preview 01:51

In this lesson, we add in our starry skybox!

Lighting the Moon Base Preview 27:36

**FOR THOSE OF YOU LOOKING FOR THE SKYBOX** - You can find the Star material at Moonbase > Textures > StarTexture.  drag it into the skybox material slot in the lighting panel! _ am recording a video of this small step that will be available soon!

This lesson will involve adding some lights to our scene and setting them up so it looks as though we're on the moon! We look at the creation of light probes to eventually light our asteroids and also make a reflection probe to really make our 3D models look the best.

Getting your Virtual Reality Hands Preview 18:55

In this lesson, we will import our 'VRhands' unity package (available as a downloadable resource) and get our virtual reality hands to show up in our game. 

Our First C# Script - Looking for our VR Controllers to detect button presses. Preview 30:52

In this lesson, we create our very first c# script to detect our controllers and listen for a particular button to be pressed. Allowing us to control our hand animations.

Animating Our VR Hands Preview 14:26

This lesson focuses on creating our hand animation, this is controlled by a blend tree that takes in two values from our hand animation script.

Picking up virtual objects - grab some lasers! Preview 19:10

We will learn how to add some interactivity to our models, we will learn how to add components to our laser guns that allow the player to pick up virtual objects with their controllers.

We will also investigate an issue with our hands and fixing the attachment point.

Shooting Our Lasers! Preview 34:54

This lesson shows how we can add interaction to our lasers.. we add the ability through c# to have animation, sound and object creation to the firing the laser. We also cover and resolve some common issues that arise during testing.

Fun With Gizmos Preview 06:52

Discover how we can use gizmos to help visualise elements of our game in the scene view. We'll create a gizmo that helps show the area the asteroids will spawn in.

Lets Make Some Asteroids - Instantiating objects using c# Preview 20:30

Taking the gizmo we made in the previous lesson we will look to use its volume to instantiate the asteroids into the scene. We will create a timer to control how frequently an asteroid is generated, then  we'll create a random position within the volume and generate a random rotation for each asteroid.

Who put on the brakes? - Making our Asteroids move! Preview 12:39

We will create a c# script that is placed on our asteroid to make it move. We will use the transform.translate capability to move in a certain direction that we can specify in the inspector. We will then generate a random speed value to create a little bit of variation!

Making The Asteroids Rotate Preview 09:12

This lesson focuses on our asteroids and giving them an initial random rotation, then as they travel we make them rotate at varying speeds to create some diversity. 

Detecting Hits From a Laser Beam - c# collision detection Preview 11:39

Create a c# script that checks the tag of a collision object to see if we have hit an asteroid with our laser beam. We also take a glimpse at the physics matrix to stop our laser beams colliding with other laser beams.

Making Our Asteroids explode! Preview 07:48

This lesson looks at extending our c# script from the previous lesson and instantiating an explosion when a player shoots the asteroid.

Light The Asteroids Preview 08:44

This lesson looks at the lighting of our asteroids, having them react to the lights we made in the lighting lesson. We tweak the settings so we can get the best of our fading effect.

The Asteroid Killzone Preview 06:50

The final video of this section looks at removing the asteroids from the scene that don't get hit by the player.

The Game Manager & Static Variables Preview 08:45

This video covers the creation of the game manager and looks at how we can use static variables to pass data between our scripts. More specifically we look at creating a score for the player every time an asteroid gets shot down!

Using The Game Manger To Fire C# Events Preview 13:33

Create a C# event that allows other scripts to perform actions when triggered. We extend our game manager so that we fire an event when an asteroid is destroyed. Then we go on to start our score script that is listening for that event and performs some simple code.

Using C# Enum For The Game Manager to Track The State Of The Game Preview 10:41

Let's take a look at creating an enum, an enumeration - allowing our game manager to track the state of the game.

Creating the start button Preview 19:30

In this lesson, we take a look at creating a start button that the user can shoot to begin the game. We also take a look at another form of C# event that we can use to control what happens when our game starts.

Creating The Score Interface Preview 05:24

We add the score user interface to the game, linking it to our game manager so that when an asteroid is shot down the score gets incremented.

Creating The Timer UI Preview 08:45

We create our timer UI. We use an image component as our UI element & then using the update function in the game manager reduce the images fill value over a set period of time.

Activating the Game Over State Preview 07:29

Using the game manager we will create another C# event that fires when our timer reaches zero

Resetting The Game For Another Round Preview 08:27

This lesson focuses on creating the reset functionality for our game.

Adding Style To The UI Preview 16:39

This lesson we get our UI looking cool, adding some elements to really bring our interface!

Project Organisation Preview 08:46

This lesson we take a look at organising our hierarchy, sorting it into logical sections and structure.

Adding Our Sun Preview 04:16

We take a look at adding our sun to the scene and fix a problem with our earth.

Adding some music Preview 10:28

In this lesson, we add music into our game and then tie the audio clips to the event system on the game manager to play a different clip depending on the current game state

Better Player Scoring Part 1 - Score Based On Distance Preview 09:09

We take a look at improving our scoring and give the player a little bonus for shooting asteroids that are further away!

Better Player Scoring Part 2 - UI Enhancement Preview 18:36

This lesson finishes off the scoring system with some handy UI for when an asteroid is hit.

Improved Asteroid Lighting Preview 13:56

We take a look at light probes and how they can be used to optimise our game.

Optimisation Preview 08:26

This lesson looks at reducing our texture sizes across our models and we perform an occlusion bake to only render what is visible in the camera

Fun With Particles Preview 11:41

This lesson focuses on the particle system and creating a bit of visual feedback for our start and reset buttons

Post Processing Preview 08:22

This lesson looks at integrating some post-processing effects to enhance the look of the game.

Building to the quest Preview 04:14

This landmark lesson rounds off the development of our game, we build our final version to the Quest!

Sidequest - A Possible Platform For Distribution Preview 01:31

A quick look at a platform to share your game with other quest users

The End - Thank You! Preview 01:30

Thanks for taking this course, I really hope you have enjoyed it! In the resources section is the unity project if you want it!