Introduction to VR with Unity
- 7.5 hours on-demand video
- 38 articles
- 29 downloadable resources
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- Create a 3D VR project targeting a device as simple as iOS/Android cardboard.
- Create immersive VR experiences with panoramic videos.
- Create interactive VR game plays with advanced Unity features, including Ray Casting and NAVigation (Path Finding).
- Create interactive head's up 3D user interfaces.
- Add support for Game Controllers and Cardboard "Screen Touch" button.
- Take advantage of Ambisonic Audio files.
- Use Unity Remote to test things in the Editor.
- Bypass Unity XR SDKs and use the Gyroscope, to test things in the Editor with Unity Remote.
- Take advantage of Unity's Events to trigger actions on interactive objects, including loading scenes.
- Use Unity's Animator State Machine along with Collider Triggers, to trigger animations when passing by.
A short introduction of the author and a brief of overview of the content.
VR is spreading fast and Unity's doing its best to make it as generic as possible.
VR is somehow a recipe, with mandatory and optional ingredients.
To follow this course, you'll need :
- A Windows PC or Mac Computer, matching the minimum requirements to run Unity
- Unity 2017.3 or a later version. You can use the free version, every feature we'll use is available in it.
- An iPhone or Android phone with a Cardboard system, or a VR device you can develop with. Don't plan on using a PSVR, unless you have a Sony Developer account.
- If you want to develop on iPhone,
- you'll need at least an iPhone 5, running iOS 8 or later.
- You'll also need an Apple iOS Developer account, a Mac Computer, and installing the latest version of Xcode.
- If you rather want to target Android,
- you'll need a phone running Android 4.1 or later with a gyroscope, compatible with Google Cardboard or DayDream (see Google Daydream hardware requirements).
- You will also have to install the Android SDK for Windows or MacOS.
- If you plan on developing for a VR device, such as Gear VR, Oculus Rift, HTC Vive, or MS Hololens, make sure the hardware is supported on your development platform. Most of these hardware are not fully compatible yet on Mac.
- For Cardboard users, I'll also touch on using a wireless controller to implement interactivity and navigation.
- If you develop on iPhone, make sure to get an MFI (Made for iOS) game controller.
- If you have a non MFI controller, such as the cheap remotes or ICade devices, I'll touch on hacking these with iOS.
- If you develop on Android, make sure the controller is supported.
- Any other VR related device can be used. I'll do my best to touch on them as I get to test them. First in list is the 3D Rudder, a foot controller.
I'll keep a list of hardware for reference here.
To build your project as an "apk" you can push on your Android device, you need to :
- Go to Unity's Preferences, then External Tools
- In the Android section, click on Download next to the SDK path, and install Android Studio
- Then browse for the SDK root folder you just installed.
- Then install jdk1.8.0_161 from the link provided here in the resources. (Not using the download button).
- Then browse to /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home.
- You shouldn't have to, but you can also install android-ndk-r13b using the download button, and browse to its location.
- Then run Android Studio, and click "Configure".
- Under SDK Tools, expand the SDKs and uncheck 25.0.3, then click on Apply.
Unity should now be able to build the project.
If you've skipped the intro videos, this video will update you as to what we've done.
A VR experience very much relies on what you're looking at, or pointing at with a remote controller.
In this section, we're going to introduce Unity scripting and C# standards, to have objects react to their position relative to the screen or camera's position.
Now that we have access to the currently highlighted object, we're going to trigger actions on it. Let's begin with adding a Progress Bar image.
Whenever several classes share a fare amount of mechanics, Object Oriented Programming, especially inheritance, allows us to regather all the code in a parent class. This not only makes it easier to implement the mechanics in different components, but it's also easier to maintain.
Unless you're using Room Scale Tracking, we have no idea of the cardinal direction the Gyroscope will be initialised in. We're going to use XR features, Scene Manager Events and make the object Persistent so that we "recenter" the orientation on every new scene load event.
Let's begin with a quick overview of the ways we can navigate a 3D world with Unity.
To experiment scene navigation, we're going to use an environment from the Asset Store.
In this lecture we are going to use Pro Builder (free extension available from the Asset Store) to create a 3D cone object.
You can import the Reticle-Cone package if you want to skip this part.
Then we'll code a custom shader to display a 2D reticle texture with alpha, slightly off its render position. This is known as Decal rendering.
You can also use the shader file provided in the resources.
Now that we can navigate our environment, it'd be nice to open doors instead of just walking through them. And this is going to be fairly simple with Animator, and Trigger Colliders.
- Unity 2017.3 or later.
- If targeting iPhone : an Apple iOS Developer account, a Mac computer and Xcode.
- If targeting Android : Android SDK (free).
- As an option, if targeting iPhone : an MFI (Made For iPhone) bluetooth Game Controller.
- As an option, if targeting Android : an Android bluetooth Game Controller.
- If targeting Windows/Mac : a supported VR device (Oculus Rift, HTC Vive, Microsoft Hololens).
This course aims at helping anyone willing to learn Unity to create VR experiences.
No previous programming experience is required, and most of the principles covered in the course will help future programmers wrap their head around programming basics.
It features a self learning approach. Every topic comes in on a need to know basis.
Most of the course examples can be done with the simplest hardware.
Whether you want to experiment with a simple Android or iPhone cardboard, add a remote game controller, or go for pro hardware, the principles, techniques and code you'll take away from this course will help you deliver a full VR experience, fast!
- VR enthusiasts willing to learn Unity
- Unity developers willing to learn VR features